Skip to content

Commit

Permalink
Merge branch 'et/spell-poll-infinite-with-minus-one-only' into maint
Browse files Browse the repository at this point in the history
* et/spell-poll-infinite-with-minus-one-only:
  upload-pack: keep poll(2)'s timeout to -1
  • Loading branch information
Junio C Hamano committed Sep 19, 2014
2 parents 08fd8a0 + 6c71f8b commit b8f7239
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion upload-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b8f7239

Please sign in to comment.