[geary] Treat transient DNS errors as simply indicating being offline



commit 15e709cd669dbb12b439342833096320f5b3dad7
Author: Michael Gratton <mike vee net>
Date:   Fri Feb 15 14:00:26 2019 +1100

    Treat transient DNS errors as simply indicating being offline

 src/engine/util/util-connectivity-manager.vala | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/engine/util/util-connectivity-manager.vala b/src/engine/util/util-connectivity-manager.vala
index 72cadd77..e8b42bed 100644
--- a/src/engine/util/util-connectivity-manager.vala
+++ b/src/engine/util/util-connectivity-manager.vala
@@ -124,6 +124,11 @@ public class Geary.ConnectivityManager : BaseObject {
             debug("DBus error checking %s reachable, treating as reachable: %s",
                   endpoint, err.message);
             is_reachable = true;
+        } catch (GLib.ResolverError.TEMPORARY_FAILURE err) {
+            // Host name could not be resolved since name servers
+            // could not be reached, so treat as being offline.
+            debug("Transient error checking %s reachable, treating offline: %s",
+                  endpoint, err.message);
         } catch (GLib.Error err) {
             if (err is IOError.NETWORK_UNREACHABLE &&
                                this.monitor.network_available) {


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