Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/daemon.c b/daemon.c
index 46dddaca5a..a84495113e 100644
--- a/daemon.c
+++ b/daemon.c
@@ -673,9 +673,11 @@ static void set_keep_alive(int sockfd)
{
int ka = 1;
- if (setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &ka, sizeof(ka)) < 0)
- logerror("unable to set SO_KEEPALIVE on socket: %s",
- strerror(errno));
+ if (setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &ka, sizeof(ka)) < 0) {
+ if (errno != ENOTSOCK)
+ logerror("unable to set SO_KEEPALIVE on socket: %s",
+ strerror(errno));
+ }
}
static int execute(void)