summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 01de944..433211a 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -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",