aboutsummaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-09-08 05:02:06 -0400
committerJunio C Hamano <gitster@pobox.com>2013-09-09 11:15:17 -0700
commit115dedd72223e101181363f4e6053b4c937fdc37 (patch)
tree75792b9c700829cda9241c48fa7bce64663d9ca3 /upload-pack.c
parent05e95155a10fab3d3c495076e51b2ce79fa26cf3 (diff)
downloadgit-115dedd72223e101181363f4e6053b4c937fdc37.tar.gz
git-115dedd72223e101181363f4e6053b4c937fdc37.tar.xz
upload-pack: bump keepalive default to 5 seconds
There is no reason not to turn on keepalives by default. They take very little bandwidth, and significantly less than the progress reporting they are replacing. And in the case that progress reporting is on, we should never need to send a keepalive anyway, as we will constantly be showing progress and resetting the keepalive timer. We do not necessarily know what the client's idea of a reasonable timeout is, so let's keep this on the low side of 5 seconds. That is high enough that we will always prefer our normal 1-second progress reports to sending a keepalive packet, but low enough that no sane client should consider the connection hung. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 289717ed5..fb9be2a93 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -40,7 +40,7 @@ static struct object_array have_obj;
static struct object_array want_obj;
static struct object_array extra_edge_obj;
static unsigned int timeout;
-static int keepalive = -1;
+static int keepalive = 5;
/* 0 for no sideband,
* otherwise maximum packet size (up to 65520 bytes).
*/