MCPcopy Create free account
hub / github.com/git/git / enable_keepalive

Function enable_keepalive

connect.c:761–767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759}
760
761static void enable_keepalive(int sockfd)
762{
763 int ka = 1;
764
765 if (setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &ka, sizeof(ka)) < 0)
766 error_errno(_("unable to set SO_KEEPALIVE on socket"));
767}
768
769#ifndef NO_IPV6
770

Callers 1

git_tcp_connect_sockFunction · 0.85

Calls 1

error_errnoFunction · 0.85

Tested by

no test coverage detected