Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'et/spell-poll-infinite-with-minus-one-only'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 11 Sep 2014 17:33:28 +0000
(10:33 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 11 Sep 2014 17:33:29 +0000
(10:33 -0700)
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
upload-pack.c
patch
|
blob
|
history
raw
(from parent 1:
6c1d42a
)
diff --git
a/upload-pack.c
b/upload-pack.c
index c9ea1d3be668f9beeac408dfdf5ceea90c4a6ca8..c789ec00507696b4e52b081b66cc0e7c8cba42f9 100644
(file)
--- 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",