From: sgunderson@bigfoot.com <> Date: Tue, 13 Feb 2007 20:29:33 +0000 (+0100) Subject: It looks like send() can give us EAGAIN even if epoll() said the socket X-Git-Url: https://git.sesse.net/?p=jam;a=commitdiff_plain;h=b1ce9404c6aaf3105377489bfc8d0bf27ad67b3b It looks like send() can give us EAGAIN even if epoll() said the socket was ready (after all, we don't check the events bits). Just ignore that. --- diff --git a/jam.c b/jam.c index eb7dc1a..581d51c 100644 --- 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); }