mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-11-23 07:00:07 +00:00
not start timer when open wifi repeatedly
Signed-off-by: gusihan <igusihan@qq.com>
This commit is contained in:
parent
0c26ba2d1a
commit
978006efc3
@ -88,8 +88,13 @@ ErrCode WifiTogglerManager::WifiToggled(int isOpen, int id)
|
||||
void WifiTogglerManager::StartWifiToggledTimer()
|
||||
{
|
||||
WIFI_LOGD("StartWifiToggledTimer");
|
||||
pWifiControllerMachine->StopTimer(CMD_WIFI_TOGGLED_TIMEOUT);
|
||||
pWifiControllerMachine->MessageExecutedLater(CMD_WIFI_TOGGLED_TIMEOUT, WIFI_OPEN_TIMEOUT);
|
||||
WifiOprMidState midState = WifiConfigCenter::GetInstance().GetWifiMidState(INSTID_WLAN0);
|
||||
if (midState != WifiOprMidState::RUNNING && midState != WifiOprMidState::OPENING) {
|
||||
pWifiControllerMachine->StopTimer(CMD_WIFI_TOGGLED_TIMEOUT);
|
||||
pWifiControllerMachine->MessageExecutedLater(CMD_WIFI_TOGGLED_TIMEOUT, WIFI_OPEN_TIMEOUT);
|
||||
} else {
|
||||
WIFI_LOGW("start wifi when wifi is already opening or opened");
|
||||
}
|
||||
}
|
||||
|
||||
void WifiTogglerManager::StopWifiToggledTimer()
|
||||
|
Loading…
Reference in New Issue
Block a user