Fix bug with ping timeout

This commit is contained in:
Oleksii Shevchuk 2017-07-05 08:35:24 +03:00
parent 2bcef8df65
commit 85f11310a5
3 changed files with 4 additions and 4 deletions

View File

@ -80,7 +80,7 @@ class PupyConnection(Connection):
logging.debug('Sync poll serve interrupted: {}/inactive={}'.format(
seq, self.inactive))
if self._ping:
self.ping(self._ping_timeout)
self.ping(timeout=self._ping_timeout)
finally:
if DEBUG_NETWORK:
@ -91,7 +91,7 @@ class PupyConnection(Connection):
logging.debug('Sync poll wait: {}'.format(seq))
self._sync_events[seq].wait(timeout=self._serve_timeout)
if self._ping:
self.ping(self._ping_timeout)
self.ping(timeout=self._ping_timeout)
if DEBUG_NETWORK:
logging.debug('Sync poll complete: {}/inactive={}'.format(seq, self.inactive))

View File

@ -155,7 +155,7 @@ class PupyTCPServer(ThreadedServer):
while not connection.closed:
connection.serve(interval or 10)
if interval:
connection.ping(timeout)
connection.ping(timeout=timeout)
except Empty:
self.logger.debug('{}:{} Timeout'.format(h, p))

View File

@ -736,7 +736,7 @@ def rpyc_loop(launcher):
interval, timeout = conn.get_pings()
conn.serve(interval or 10)
if interval:
conn.ping(timeout)
conn.ping(timeout=timeout)
except SystemExit:
raise