Skip to content
Snippets Groups Projects
Commit 542690f9 authored by Antoine Millet's avatar Antoine Millet
Browse files

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

parent 004ae2b2
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment