GNOME Bugzilla – Bug 780035
doc: Builder doesn't correctly detect internet status
Last modified: 2017-03-14 21:53:26 UTC
gnome-builder 3.23.92-0ubuntu1 Ubuntu GNOME 17.04 I disabled my Wi-FI so I have no internet access. I then opened Builder and clicked Help and https://builder.readthedocs.io/ opened in Firefox, but what's supposed to happen is that the locally installed help gets opened instead. $ nmcli g STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN connected (local only) full enabled disabled enabled enabled Ubuntu doesn't yet ship NetworkManager's connectivity config by default, but I have enabled it on my computer.
Is it the case that g_network_monitor_get_network_available() will always return TRUE? Will g_network_monitor_can_reach_async() work? We could use that to delay opening the URI instead of g_network_monitor_get_network_enabled() I guess.
Created attachment 347959 [details] [review] help: use g_network_monitor_can_reach_async() We cannot rely on g_network_monitor_get_available() being specific enough to tell us if we can reach builder.readthedocs.io, so use the can-reach async API instead.
Attachment 347959 [details] pushed as f1c82a3 - help: use g_network_monitor_can_reach_async()