[gnome-shell] network: deal with recycling of closed active connections



commit 529b6ca9359de2b97b5114a642d61d2ecfc7b5db
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Sat Apr 2 15:30:45 2011 -0400

    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

 js/ui/status/network.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 885c5d7..5510272 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]