Skip to content

Commit 9ddd689

Browse files
committed
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
2 parents 6c1d42a + 6c71f8b commit 9ddd689

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
@@ -166,7 +166,9 @@ static void create_pack_file(void)
166166
if (!pollsize)
167167
break;
168168

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

0 commit comments

Comments
 (0)