net/SocketDescriptor: add method SetKeepAlive()

This commit is contained in:
Max Kellermann
2017-08-10 19:25:02 +02:00
parent 9a5bcc6db0
commit 1f47dc990d
5 changed files with 8 additions and 13 deletions

View File

@@ -158,7 +158,7 @@ OneServerSocket::Accept() noexcept
return;
}
if (socket_keepalive(peer_fd.Get())) {
if (!peer_fd.SetKeepAlive()) {
const SocketErrorMessage msg;
FormatError(server_socket_domain,
"Could not set TCP keepalive option: %s",