Open bertmelis opened 1 year ago
Feature request: Make WiFi.begin() gracefully handle low memory situations.
I must admit I solved my low memory issue so I don't suffer this issue anymore. But underlying, the issue remains of course.
WiFi.begin() gracefully handles low memory situations as it returns WL_CONNECT_FAILED
. This issue is that afterwards, there is no event anymore to hook into for a next attempt to reconnect.
Board
esp32c3
Device Description
Wemos C3 mini
Hardware Configuration
base board powered by USB
Version
v2.0.9
IDE Name
Platformio
Operating System
Windows 11
Flash frequency
40Mhz
PSRAM enabled
no
Upload speed
115200
Description
On autoreconnecting to WiFi, the code calls
WiFi.disconnect()
and afterwardsWiFi.begin(ssid, psk)
.It may happen that the call to
begin
fails. Apparently, in this case, no callback is fired to signal the failed connection and no further attempt is made to reconnect again.I do have low memory issues because of TLS connections that are closing/retrying after the WiFi loss. I suppose they are only cleaned up after a while by the framework.
I'm using the 2.x release.
Sketch
Debug Message
After this log, the esp stays silent.