summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-19 14:05:13 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-19 14:05:13 -0700
commitb8f7239058e6f7c8bb68bd4276ff797d83e03229 (patch)
tree347c0e84382ea0a5e88b56a02746862d260bcb55 /upload-pack.c
parent08fd8a055cd11291020bf8c6f83d27cdc55df419 (diff)
parent6c71f8b0d3d39beffe050f92f33a25dc30dffca3 (diff)
downloadgit-b8f7239058e6f7c8bb68bd4276ff797d83e03229.tar.gz
Merge branch 'et/spell-poll-infinite-with-minus-one-only' into maint
* et/spell-poll-infinite-with-minus-one-only: upload-pack: keep poll(2)'s timeout to -1
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 01de944a0a..433211a238 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -167,7 +167,9 @@ static void create_pack_file(void)
if (!pollsize)
break;
- ret = poll(pfd, pollsize, 1000 * keepalive);
+ ret = poll(pfd, pollsize,
+ keepalive < 0 ? -1 : 1000 * keepalive);
+
if (ret < 0) {
if (errno != EINTR) {
error("poll failed, resuming: %s",