[geary/mjog/741-inbox-getting-closed: 89/91] Geary.Util.ConnectivityManager: Fix a spurious connectivity error report
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/741-inbox-getting-closed: 89/91] Geary.Util.ConnectivityManager: Fix a spurious connectivity error report
- Date: Fri, 24 Apr 2020 05:30:54 +0000 (UTC)
commit 530c205ce7345017328f63e411733d76fdf8dece
Author: Michael Gratton <mike vee net>
Date: Sat Apr 11 12:46:53 2020 +1000
Geary.Util.ConnectivityManager: Fix a spurious connectivity error report
When a general error occurs checking connectivity of a remote server,
only treat it as an error if GNetworkMonitor indicates the network is
available (i.e. that a default route exists). If there is no network,
it's not surprising that the error occurred.
This fixes a spurious error when the delayed check runs but the host
is offline.
src/engine/util/util-connectivity-manager.vala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/engine/util/util-connectivity-manager.vala b/src/engine/util/util-connectivity-manager.vala
index 9dc0f068..109d14eb 100644
--- a/src/engine/util/util-connectivity-manager.vala
+++ b/src/engine/util/util-connectivity-manager.vala
@@ -166,7 +166,7 @@ public class Geary.ConnectivityManager : BaseObject {
// needlessly hassle the user with expected error
// messages.
GLib.NetworkConnectivity connectivity = this.monitor.connectivity;
- if (connectivity == FULL ||
+ if ((this.monitor.network_available && connectivity == FULL) ||
(connectivity == LOCAL && is_local_address())) {
debug("Error checking %s [%s] reachable, treating unreachable: %s",
endpoint, connectivity.to_string(), err.message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]