Removed keepalive its not compatible with all os

This commit is contained in:
HelloZeroNet 2015-01-30 02:09:47 +01:00
parent 79e8bf7ebb
commit 47cad25862
1 changed files with 4 additions and 4 deletions

View File

@ -36,10 +36,10 @@ class Peer:
self.socket.setsockopt(zmq.RCVTIMEO, 50000) # Wait for data arrive
self.socket.setsockopt(zmq.SNDTIMEO, 5000) # Wait for data send
self.socket.setsockopt(zmq.LINGER, 500) # Wait for socket close
self.socket.setsockopt(zmq.TCP_KEEPALIVE, 1) # Enable keepalive
self.socket.setsockopt(zmq.TCP_KEEPALIVE_IDLE, 4*60) # Send after 4 minute idle
self.socket.setsockopt(zmq.TCP_KEEPALIVE_INTVL, 15) # Wait 15 sec to response
self.socket.setsockopt(zmq.TCP_KEEPALIVE_CNT, 4) # 4 Probes
#self.socket.setsockopt(zmq.TCP_KEEPALIVE, 1) # Enable keepalive
#self.socket.setsockopt(zmq.TCP_KEEPALIVE_IDLE, 4*60) # Send after 4 minute idle
#self.socket.setsockopt(zmq.TCP_KEEPALIVE_INTVL, 15) # Wait 15 sec to response
#self.socket.setsockopt(zmq.TCP_KEEPALIVE_CNT, 4) # 4 Probes
self.socket.connect('tcp://%s:%s' % (self.ip, self.port))