policy: don't schedule_activate_all() when going to sleep

This was added by cfb2af1df2, but it's
wrong. Here we reset the autoconnect-blocked-reasons when going to sleep,
not when waking up.

(cherry picked from commit 88549b031a)
This commit is contained in:
Thomas Haller 2017-11-29 09:37:05 +01:00
parent e4f042f9bf
commit 6c22f99219

View file

@ -1465,10 +1465,8 @@ sleeping_changed (NMManager *manager, GParamSpec *pspec, gpointer user_data)
g_object_get (G_OBJECT (manager), NM_MANAGER_NETWORKING_ENABLED, &enabled, NULL);
/* Reset retries on all connections so they'll checked on wakeup */
if (sleeping || !enabled) {
if (reset_autoconnect_all (self, NULL, FALSE))
schedule_activate_all (self);
}
if (sleeping || !enabled)
reset_autoconnect_all (self, NULL, FALSE);
}
static void