diff options
author | Iain Lane <iainl@gnome.org> | 2018-08-16 11:59:36 +0100 |
---|---|---|
committer | Iain Lane <iainl@gnome.org> | 2018-08-16 11:59:36 +0100 |
commit | 43342688c81c638bfa0bfe06fbaa99c263682e7b (patch) | |
tree | 7ae97820b0836518bb49f122d1a241b8f189118a | |
parent | 764fbbe0524e89eb25cad8894fa4091f3fa47ac7 (diff) | |
download | gnome-shell-wip/network-active-connection-check-first.tar.gz |
network: When processing new devices, look at the active connection firstwip/network-active-connection-check-first
NMConnection._sync() expects the active connection to already be in
_connectionItems, which happens from _addConnection(). If it isn't in
there, we get a null dereference and the indicator can get into a weird
state where it doesn't display devices / connections properly.
When processing a new device in NMApplet._deviceAdded(), let's look for
an active connection and add that one first before looking at the rest
of the connections.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/140
-rw-r--r-- | js/ui/status/network.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/ui/status/network.js b/js/ui/status/network.js index bf3a2bac6..c616738d5 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1770,8 +1770,13 @@ var NMApplet = new Lang.Class({ this._syncDeviceNames(); if (wrapper instanceof NMConnectionSection) { + let activeConnection = device.active_connection.connection; + if (activeConnection) + wrapper.checkConnection(activeConnection); + this._connections.forEach(connection => { - wrapper.checkConnection(connection); + if (connection != activeConnection) + wrapper.checkConnection(connection); }); } } |