[geary/mjog/741-inbox-getting-closed] Geary.ClientService: Update connectivity timeouts



commit 4f11402c4a3386350d255edefa33075cf2013c4a
Author: Michael Gratton <mike vee net>
Date:   Sat Apr 11 13:10:51 2020 +1000

    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 b5bee4fc..0a85719e 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;
 
 
     /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]