diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-24 20:19:22 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-24 20:19:22 +0300 |
commit | f592edf20b6d91fb6c25d9d3b1021d2ab4c5fcb3 (patch) | |
tree | 3e888d25dd9e46073dd2e8d7903b82eb8df55169 /src/worker.c | |
parent | fb67ab386b508327054548533617a348427df4a6 (diff) | |
download | rspamd-f592edf20b6d91fb6c25d9d3b1021d2ab4c5fcb3.tar.gz rspamd-f592edf20b6d91fb6c25d9d3b1021d2ab4c5fcb3.zip |
* Fix multiply accept issues
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/worker.c b/src/worker.c index 4d6c2bacc..bf5dfa159 100644 --- a/src/worker.c +++ b/src/worker.c @@ -232,6 +232,11 @@ accept_socket (int fd, short what, void *arg) msg_warn ("accept_socket: accept failed: %s", strerror (errno)); return; } + /* Check for EAGAIN */ + if (nfd == 0) { + msg_debug ("accept_socket: cannot accept socket as it was already accepted by other worker"); + return; + } if (ss.ss_family == AF_UNIX) { msg_info ("accept_socket: accepted connection from unix socket"); |