]> git.sesse.net Git - jam/commitdiff
It looks like send() can give us EAGAIN even if epoll() said the socket
authorsgunderson@bigfoot.com <>
Tue, 13 Feb 2007 20:29:33 +0000 (21:29 +0100)
committersgunderson@bigfoot.com <>
Tue, 13 Feb 2007 20:29:33 +0000 (21:29 +0100)
was ready (after all, we don't check the events bits). Just ignore that.

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);
                        }