From: sgunderson@bigfoot.com <> Date: Tue, 13 Feb 2007 19:45:27 +0000 (+0100) Subject: Handle EAGAIN in connect(). Duh. X-Git-Url: https://git.sesse.net/?p=jam;a=commitdiff_plain;h=703a230f6d1292ed0e8207b748eef1c28710dacb Handle EAGAIN in connect(). Duh. --- diff --git a/jam.c b/jam.c index f7417e3..0353dc5 100644 --- a/jam.c +++ b/jam.c @@ -10,6 +10,7 @@ #include #include #include +#include unsigned short port = 2007; @@ -173,7 +174,7 @@ void generate_new_sender(int ep_fd) sin.sin_addr = destinations[dst_num]; // non-blocking connect (will be detected by epoll later) - if (connect(sock, (struct sockaddr *)&sin, sizeof(sin)) == -1) { + if (connect(sock, (struct sockaddr *)&sin, sizeof(sin)) == -1 && errno != EINPROGRESS) { perror("connect()"); exit(1); }