From: Matt McCutchen Date: Tue, 13 Jan 2009 17:42:54 +0000 (-0800) Subject: Handle simultaneous arrival of multiple connections. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/bb499bd7a04b826181468b77e05ca4a3a89feea8?hp=416cef36e98fc2ce2c75bd76b8e97d892a3d88b8 Handle simultaneous arrival of multiple connections. --- diff --git a/socket.c b/socket.c index a3fc9aeb..5df3a500 100644 --- 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++) {