Commit 542690f9 authored by Antoine Millet's avatar Antoine Millet

[bug#4062] Added usage of SO_KEEPALIVE flag on sjrpc sockets.

parent 004ae2b2
......@@ -32,6 +32,9 @@ class RpcConnection(object):
def __init__(self, sock, manager, handler=None, timeout=None):
# Sock of this connection:
self._sock = sock
# Activate TCP keepalive on the connection:
self._sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
# Inbound buffer containing currently readed message while it sending:
self._inbound_buffer = BytesBuffer()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment