X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=jam.c;fp=jam.c;h=0353dc53e7c5257d583daee14fa1ef606f674065;hb=703a230f6d1292ed0e8207b748eef1c28710dacb;hp=f7417e373b5583e852d24b7a7378c9def90f2be3;hpb=f37bf230ab686ac4c964758666406afa1319d0b7;p=jam 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); }