network: deal with recycling of closed active connections
If you restart NetworkManager, then the list of active connections is emptied, then comes back with the same GObjects in it. If the _primaryDevice field isn't cleared on the object, then we won't know we need to set it back on the device, resulting in the active device not showing up in the menu. https://bugzilla.gnome.org/show_bug.cgi?id=646558
This commit is contained in:
parent
625a4c0766
commit
529b6ca935
@ -1758,8 +1758,10 @@ NMApplet.prototype = {
|
||||
|
||||
for (let i = 0; i < closedConnections.length; i++) {
|
||||
let active = closedConnections[i];
|
||||
if (active._primaryDevice)
|
||||
if (active._primaryDevice) {
|
||||
active._primaryDevice.setActiveConnection(null);
|
||||
active._primaryDevice = null;
|
||||
}
|
||||
if (active._notifyStateId) {
|
||||
active.disconnect(active._notifyStateId);
|
||||
active._notifyStateId = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user