| 759 | } |
| 760 | |
| 761 | static 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 |
no test coverage detected