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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -33,6 +33,9 @@ class RpcConnection(object):
        # 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()