Handle simultaneous arrival of multiple connections.
authorMatt McCutchen <matt@mattmccutchen.net>
Tue, 13 Jan 2009 17:42:54 +0000 (09:42 -0800)
committerWayne Davison <wayned@samba.org>
Sat, 17 Jan 2009 21:46:11 +0000 (13:46 -0800)
socket.c

index 97f9e73..3e70af2 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -578,7 +578,7 @@ void start_accept_loop(int port, int (*fn)(int, int))
                fds = deffds;
 #endif
 
-               if (select(maxfd + 1, &fds, NULL, NULL, NULL) != 1)
+               if (select(maxfd + 1, &fds, NULL, NULL, NULL) < 1)
                        continue;
 
                for (i = 0, fd = -1; sp[i] >= 0; i++) {