[Rsync-patches] [PATCH] Properly handle the simultaneous arrival of connections on different sockets:

Matt McCutchen <matt at mattmccutchen.net>
Mon Jan 12 21:30:25 PST 2009


http://lists.samba.org/archive/rsync/2009-January/022458.html
---
 socket.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/socket.c b/socket.c
index a3fc9ae..5df3a50 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++) {
-- 
1.6.1.86.g57f37



More information about the rsync-patches mailing list