Wifi wasn't actually stopped after receiving the WIFI_EVENT_STA_STOP
Posted: Thu Jun 25, 2020 12:31 pm
Hi!
I've ran into a possible edge-case issue. I called esp_wifi_stop() right when the wifi started connecting (literally 20 milliseconds later), I then received the WIFI_EVENT_STA_STOP and tried to start the wifi back up using esp_wifi_start() I received a ESP_ERR_WIFI_STOP_STATE. So it seems like the WIFI_EVENT_STA_STOP event got fired before the wifi was actually stopped.
Attached is a screenshot from the console, the timeout_handler is the one who called the esp_wifi_stop() function, and after receiving the stop event (WIFI_EVENT id: 5) my code (event_handler) tried to start it back up.
Is this something that's (semi-) intentional and I should code checks for it?
I've ran into a possible edge-case issue. I called esp_wifi_stop() right when the wifi started connecting (literally 20 milliseconds later), I then received the WIFI_EVENT_STA_STOP and tried to start the wifi back up using esp_wifi_start() I received a ESP_ERR_WIFI_STOP_STATE. So it seems like the WIFI_EVENT_STA_STOP event got fired before the wifi was actually stopped.
Attached is a screenshot from the console, the timeout_handler is the one who called the esp_wifi_stop() function, and after receiving the stop event (WIFI_EVENT id: 5) my code (event_handler) tried to start it back up.
Is this something that's (semi-) intentional and I should code checks for it?