Skip to content
Browse files

Added SO_KEEPALIVE to socket options for RPC.

Signed-off-by: jedi95 <jedi95@gmail.com>
  • Loading branch information...
1 parent 1385f7d commit 92c32fadae99317fca34991d90b483ab33d2b38f @jedi95 committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 minerutil/RPCProtocol.py
View
2 minerutil/RPCProtocol.py
@@ -49,6 +49,8 @@ def _doRequest(self, url, *args):
self.connection.connect()
self.connection.sock.setsockopt(socket.SOL_TCP,
socket.TCP_NODELAY, 1)
+ self.connection.sock.setsockopt(socket.SOL_SOCKET,
+ socket.SO_KEEPALIVE, 1)
try:
self.connection.request(*args)
return self.connection.getresponse()

0 comments on commit 92c32fa

Please sign in to comment.
Something went wrong with that request. Please try again.