Commit 52d1cb85 authored by Michael Gratton's avatar Michael Gratton 🤞

Merge branch 'wip/266-dns-errors' into 'master'

Fix spurious "Can't reach host" running under Flatpak, maybe elsewhere

See merge request !162
parents c8f5e029 b7d0f073
Pipeline #65336 passed with stages
in 31 minutes and 57 seconds
......@@ -115,6 +115,23 @@ public class Geary.ConnectivityManager : BaseObject {
} catch (GLib.IOError.CANCELLED err) {
// User cancelled, so leave as unreachable
} catch (GLib.IOError.HOST_UNREACHABLE err) {
// Despite returning a boolean, per its API docs
// NetworkMonitor.can_reach() should never actually return
// false under Vala since it will throw an error instead,
// and usually this one. While that's not 100% always the
// case, we do need to treat this error as meaning
// unreachable.
// However if the monitor says there actually is a network
// available, we may be running under Flatpak with Network
// Manager connectivity checking enabled and hitting issue
// GNOME/glib#1705. Pull this debug logging out once that
// is fixed.
if (this.monitor.network_available) {
debug("Assuming %s is unreachable, despite network availability",
} catch (GLib.DBusError err) {
// Running under Flatpak can cause a DBus error if the
// portal is malfunctioning (e.g. Geary #97 & #82 and
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment