Browse Source

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
maint
Junio C Hamano 11 years ago
parent
commit
9ddd68973a
  1. 4
      upload-pack.c

4
upload-pack.c

@ -166,7 +166,9 @@ static void create_pack_file(void) @@ -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",

Loading…
Cancel
Save