threads / patch / 2162

patchgit-daemon: fix poll timeout

Subject: [PATCH] git-daemon: fix poll timeout

## tl;dr

One message between Oct 20, 2005 and Oct 20, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Timo Hirvonen· Oct 20, 2005, 08:33 UTC · lore
Timeout must be negative (infinite), not 0.
---
 daemon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

applies-to: 50f9bed9a78e1f51178ebf6be3cd9c20b2ffcb0b a6603be778e535b12f7aa42174889981af42b10c

Show changes to daemon.c +1 −1
diff --git a/daemon.c b/daemon.c
index c3381b3..b3bcd7a 100644
--- a/daemon.c
+++ b/daemon.c
@@ -533,7 +533,7 @@ static int service_loop(int socknum, int
 	for (;;) {
 		int i;
 
-		if (poll(pfd, socknum, 0) < 0) {
+		if (poll(pfd, socknum, -1) < 0) {
 			if (errno != EINTR) {
 				error("poll failed, resuming: %s",
 				      strerror(errno));
---
0.99.8.GIT

← back to recent threads