summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-11 10:33:28 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-11 10:33:29 -0700
commit9ddd68973a946213a4607d6610e8a2b7ef5b19c0 (patch)
treeeb35e3e9fbf656b63a59df3058be780394b5c263 /upload-pack.c
parent6c1d42acae99ee0bbb9af8e91c5dca5d8fbb4f39 (diff)
parent6c71f8b0d3d39beffe050f92f33a25dc30dffca3 (diff)
downloadgit-9ddd68973a946213a4607d6610e8a2b7ef5b19c0.tar.gz
Merge branch 'et/spell-poll-infinite-with-minus-one-only'
We used to pass -1000 to poll(2), expecting it to also mean "no timeout", which should be spelled as -1. * 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 c9ea1d3be6..c789ec0050 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -166,7 +166,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",