Skip to content

Commit b8f7239

Browse files
committed
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
2 parents 08fd8a0 + 6c71f8b commit b8f7239

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

upload-pack.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ static void create_pack_file(void)
167167
if (!pollsize)
168168
break;
169169

170-
ret = poll(pfd, pollsize, 1000 * keepalive);
170+
ret = poll(pfd, pollsize,
171+
keepalive < 0 ? -1 : 1000 * keepalive);
172+
171173
if (ret < 0) {
172174
if (errno != EINTR) {
173175
error("poll failed, resuming: %s",

0 commit comments

Comments
 (0)