am43
am43 copied to clipboard
wifiDownSince keeps getting reset when WiFi loses connection
So - I noticed that occasionally the ESP starts receiving NO_AP_FOUND events consistently:
[W][WiFiGeneric.cpp:353] _eventCallback(): Reason: 201 - NO_AP_FOUND
[WiFi-event] event: 5
WiFi lost connection
When this happens, the clock for the wifiDownSince just keeps getting reset and so it never tries to reconnect. I think I can fix this by only setting wifiDownSince if the current millis() is less than the wifiDownSince, and setting the wifiDownSince = max value (4294967295 or something) when we connect.
Do you have any thoughts?