OSDN Git Service

Merge branch 'ew/keepalive'
authorJunio C Hamano <gitster@pobox.com>
Tue, 20 Dec 2011 00:06:32 +0000 (16:06 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Dec 2011 00:06:32 +0000 (16:06 -0800)
* ew/keepalive:
  enable SO_KEEPALIVE for connected TCP sockets

1  2 
connect.c

diff --cc connect.c
+++ b/connect.c
@@@ -286,8 -324,10 +297,10 @@@ static int git_tcp_connect_sock(char *h
        }
  
        if (sockfd < 0)
 -              die("unable to connect a socket (%s)", strerror(saved_errno));
 +              die("unable to connect to %s:\n%s", host, error_message.buf);
  
+       enable_keepalive(sockfd);
        if (flags & CONNECT_VERBOSE)
                fprintf(stderr, "done.\n");