]> git.ipfire.org Git - thirdparty/git.git/commit - daemon.c
daemon: enable SO_KEEPALIVE for all sockets
authorEric Wong <e@80x24.org>
Wed, 25 May 2016 03:15:05 +0000 (03:15 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 May 2016 16:42:53 +0000 (09:42 -0700)
commita43b68a196652a0c6b054ee4905ac98d1cdcbbb9
tree100922f19054e8bbce4fa8ab6b95c56de7874d33
parent90f7b16b3adc78d4bbabbd426fb69aa78c714f71
daemon: enable SO_KEEPALIVE for all sockets

While --init-timeout and --timeout options exist and I've never
run git-daemon without them, some users may forget to set them
and encounter hung daemon processes when connections fail.
Enable socket-level timeouts so the kernel can send keepalive
probes as necessary to detect failed connections.

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon.c