mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1167132 - Part 12: [NetworkManager] Move network information into a separate interface (discovery). r=jryans
This commit is contained in:
parent
808f2aba91
commit
065eaa1fdc
@ -385,16 +385,16 @@ Discovery.prototype = {
|
||||
if (topic !== "network-active-changed") {
|
||||
return;
|
||||
}
|
||||
let activeNetwork = subject;
|
||||
if (!activeNetwork) {
|
||||
log("No active network");
|
||||
let activeNetworkInfo = subject;
|
||||
if (!activeNetworkInfo) {
|
||||
log("No active network info");
|
||||
return;
|
||||
}
|
||||
activeNetwork = activeNetwork.QueryInterface(Ci.nsINetworkInterface);
|
||||
log("Active network changed to: " + activeNetwork.type);
|
||||
activeNetworkInfo = activeNetworkInfo.QueryInterface(Ci.nsINetworkInfo);
|
||||
log("Active network changed to: " + activeNetworkInfo.type);
|
||||
// UDP sockets go down when the device goes offline, so we'll restart them
|
||||
// when the active network goes back to WiFi.
|
||||
if (activeNetwork.type === Ci.nsINetworkInterface.NETWORK_TYPE_WIFI) {
|
||||
if (activeNetworkInfo.type === Ci.nsINetworkInfo.NETWORK_TYPE_WIFI) {
|
||||
this._restartListening();
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user