device: only clear the activate request when the device disconnects
[NetworkManager.git] / src / devices / nm-device.c
index 583218f..19c1599 100644 (file)
@@ -10400,7 +10400,8 @@ _set_state_full (NMDevice *self,
        if (state <= NM_DEVICE_STATE_UNAVAILABLE) {
                if (available_connections_del_all (self))
                        available_connections_notify (self);
-               _clear_queued_act_request (priv);
+               if (old_state > NM_DEVICE_STATE_UNAVAILABLE)
+                       _clear_queued_act_request (priv);
        }
 
        /* Update the available connections list when a device first becomes available */