diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-09-19 14:05:13 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-19 14:05:13 -0700 |
commit | b8f7239058e6f7c8bb68bd4276ff797d83e03229 (patch) | |
tree | 347c0e84382ea0a5e88b56a02746862d260bcb55 | |
parent | Merge branch 'nd/fetch-pass-quiet-to-gc-child-process' into maint (diff) | |
parent | upload-pack: keep poll(2)'s timeout to -1 (diff) | |
download | tgif-b8f7239058e6f7c8bb68bd4276ff797d83e03229.tar.xz |
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
-rw-r--r-- | upload-pack.c | 4 |
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", |