From a5fb89bad8b6fc7498cb7056faea1fdaa44de986 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 4 Sep 2012 13:51:20 +0200 Subject: mcd_connectivity_monitor_is_online: check if we are awake as well To be considered as online, we have to be connected to the network *and* not in the proccess of sleeping. Fix a race where an account we just disconnected because we are going to sleep is put back online because the monitor was considering us online again. --- src/connectivity-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connectivity-monitor.c b/src/connectivity-monitor.c index 0ab8272e..2c22a571 100644 --- a/src/connectivity-monitor.c +++ b/src/connectivity-monitor.c @@ -465,7 +465,7 @@ mcd_connectivity_monitor_is_online (McdConnectivityMonitor *connectivity_monitor { McdConnectivityMonitorPrivate *priv = connectivity_monitor->priv; - return priv->connected; + return priv->connected && priv->awake; } gboolean -- cgit v1.2.1