From bc55f177591111f14b4752d1e51dad00d4dcac98 Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Sat, 2 Nov 2019 09:26:35 +0200 Subject: [PATCH] connection: Enable pings by default with some really large timeouts --- pupy/network/lib/connection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pupy/network/lib/connection.py b/pupy/network/lib/connection.py index 3a95f5a8..e1ad1ec0 100644 --- a/pupy/network/lib/connection.py +++ b/pupy/network/lib/connection.py @@ -248,9 +248,9 @@ class PupyConnection(Connection): self._sync_raw_exceptions = {} self._last_recv = time.time() - self._ping = False - self._ping_timeout = 30 - self._serve_timeout = 10 + self._ping = True + self._ping_timeout = 60 + self._serve_timeout = 600 self._last_ping = None self._default_serve_timeout = 5 self._queue = SyncRequestDispatchQueue.get_queue() @@ -640,7 +640,7 @@ class PupyConnection(Connection): timeout = mintimeout if __debug__: - logger.debug('Serve(%s): start / timeout = %s / interval = %s / ping = %s / %s', + logger.debug('Serve(%s): start / timeout = %s / interval = %s / ping timeout = %s / %s', self, timeout, interval, ping_timeout, self._last_ping) data = self._recv(timeout, wait_for_lock=False)