From 344fb1276b0215f7b3fb5067fae69619691541c8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 15 May 1998 07:11:29 +0000 Subject: [PATCH] fixed a select bug which caused rsync to use far more cpu time than necessary on the server --- io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/io.c b/io.c index 004f4cee..52c4cb14 100644 --- a/io.c +++ b/io.c @@ -148,7 +148,8 @@ static int readfd(int fd,char *buffer,int N) tv.tv_sec = io_timeout; tv.tv_usec = 0; - if (select(fd+1, &fds, NULL, NULL, &tv) != 1) { + if (select(fd+1, &fds, NULL, NULL, + io_timeout?&tv:NULL) != 1) { check_timeout(); } } -- 2.34.1