]> git.sesse.net Git - jam/blobdiff - jam.c
It looks like send() can give us EAGAIN even if epoll() said the socket
[jam] / jam.c
diff --git a/jam.c b/jam.c
index eb7dc1a09bc621da8aeee6c2b102f8084832bc3a..581d51c91200a69696aabe8d39e9519b19c250ca 100644 (file)
--- a/jam.c
+++ b/jam.c
@@ -251,6 +251,9 @@ void *sender_worker(void *arg)
 
                        ret = send(s->fd, buf, bytes_to_send, MSG_NOSIGNAL);
                        if (ret == -1) {
+                               if (errno == EAGAIN)
+                                       continue;
+
                                perror("send()");
                                exit(1);
                        }