Set heartbeat_interval to half of the heartbeat_timeout
This commit is contained in:
parent
e7529e5487
commit
1506e22458
3 changed files with 10 additions and 2 deletions
|
|
@ -127,6 +127,13 @@ Specify params, headers, cookies, proxies thanks to the `requests`_ library. ::
|
||||||
cookies={'a': 'aaa'},
|
cookies={'a': 'aaa'},
|
||||||
proxies={'https': 'https://proxy.example.com:8080'})
|
proxies={'https': 'https://proxy.example.com:8080'})
|
||||||
|
|
||||||
|
Wait forever. ::
|
||||||
|
|
||||||
|
from socketIO_client import SocketIO
|
||||||
|
|
||||||
|
socketIO = SocketIO('localhost')
|
||||||
|
socketIO.wait()
|
||||||
|
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
# America/Los_Angeles 11/17/2013
|
# America/Los_Angeles 11/17/2013
|
||||||
|
_ Investigate heartbeat timeouts
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ class SocketIO(object):
|
||||||
socketIO_session.server_supported_transports))
|
socketIO_session.server_supported_transports))
|
||||||
# Initialize heartbeat_pacemaker
|
# Initialize heartbeat_pacemaker
|
||||||
self.heartbeat_pacemaker = self._make_heartbeat_pacemaker(
|
self.heartbeat_pacemaker = self._make_heartbeat_pacemaker(
|
||||||
heartbeat_interval=socketIO_session.heartbeat_timeout - 2)
|
heartbeat_interval=socketIO_session.heartbeat_timeout / 2)
|
||||||
self.heartbeat_pacemaker.next()
|
self.heartbeat_pacemaker.next()
|
||||||
# Negotiate transport
|
# Negotiate transport
|
||||||
transport = _negotiate_transport(
|
transport = _negotiate_transport(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue