Add eraseCredentials option to WiFi disconnect method. by cziter15 · Pull Request #8758 · esp8266/Arduino (original) (raw)
The problem is that WiFi.disconnect function always set SSID and Password to NULL. On ESP32's version of Arduino, user can define if the config should be ever touched or not. When manually implementing reconnection, current state requires to store credentials externally between disconnect and connect method calls.
This PR aims to fix this problem by introducing second variable (eraseap), which defaults to false to maintain compatibility.