From 0e673ce5f8a45517f7c7d354aee87f87b5cfc248 Mon Sep 17 00:00:00 2001 From: Michael Gratton Date: Sat, 11 Apr 2020 13:10:51 +1000 Subject: [PATCH] Geary.ClientService: Update connectivity timeouts Swap reachable and unreachable timeouts periods so that connections are dropped sooner and not re-established too early. --- src/engine/api/geary-client-service.vala | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/engine/api/geary-client-service.vala b/src/engine/api/geary-client-service.vala index 87a6d59e..a9bab628 100644 --- a/src/engine/api/geary-client-service.vala +++ b/src/engine/api/geary-client-service.vala @@ -17,8 +17,13 @@ public abstract class Geary.ClientService : BaseObject, Logging.Source { - private const int BECAME_REACHABLE_TIMEOUT_SEC = 1; - private const int BECAME_UNREACHABLE_TIMEOUT_SEC = 3; + // Keep the unreachable timeout short so that when the connection + // actually goes down connections get pulled down ASAP. Keep the + // reachable timeout higher to avoid trying to reconnect + // immediately on notification of being reachable, which can be a + // bit bouncy + private const int BECAME_REACHABLE_TIMEOUT_SEC = 3; + private const int BECAME_UNREACHABLE_TIMEOUT_SEC = 1; /**