am43 icon indicating copy to clipboard operation
am43 copied to clipboard

wifiDownSince keeps getting reset when WiFi loses connection

Open adotagarwal opened this issue 4 years ago • 0 comments

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?

adotagarwal avatar Aug 21 '20 18:08 adotagarwal