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.
This commit is contained in:
parent
991c9ef5d7
commit
530c205ce7
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue