mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Bug 1123680 - Forget Wifi cause problems to reconnect on it immediately. r=hchang
This commit is contained in:
parent
7ae5499be8
commit
392ca34c49
@ -3266,7 +3266,23 @@ WifiWorker.prototype = {
|
||||
WifiManager.reconnect(function (ok) {
|
||||
self._sendMessage(message, ok, ok, msg);
|
||||
});
|
||||
} else {
|
||||
} else if (WifiManager.state == "INACTIVE") {
|
||||
// If AP info didn't clear, then call associate function.
|
||||
// That maybe occurs wpa supplicant that suppose already associated.
|
||||
// To avoid this case, need to clear AP info and call reassoiate
|
||||
// in INACTIVE state.
|
||||
let networkKey = getNetworkKey(network);
|
||||
if (!(networkKey in this.configuredNetworks)) {
|
||||
self._sendMessage(message, false, "Trying to forget an unknown network", msg);
|
||||
return;
|
||||
}
|
||||
let configured = this.configuredNetworks[networkKey];
|
||||
WifiManager.removeNetwork(configured.netId, function() {
|
||||
WifiManager.reassociate(function() {
|
||||
self._sendMessage(message, ok, ok, msg);
|
||||
});
|
||||
});
|
||||
}else {
|
||||
self._sendMessage(message, ok, ok, msg);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user