disable clean connect, OPTIONAL setter

setCleanConnect(bool enable); // default false

This was originally intended to improve connection stability, but it is now causing problems , this is now disabled and can be reenabled optionally.
Possible race condition diconnecting while auto connecting or async setmode delays
This commit is contained in:
tablatronix
2020-02-18 16:14:45 -06:00
parent decd2942c5
commit b61bc261bf
2 changed files with 14 additions and 4 deletions
+4 -2
View File
@@ -261,8 +261,10 @@ class WiFiManager
void setWiFiAPChannel(int32_t channel);
// set ap hidden
void setWiFiAPHidden(bool hidden); // default false
// set custom menu
// clean connect, always disconnect before connecting
void setCleanConnect(bool enable); // default false
// set custom menu
// set custom menu items and order
void setMenu(std::vector<const char*>& menu);
void setMenu(const char* menu[], uint8_t size);
@@ -340,7 +342,7 @@ class WiFiManager
unsigned long _lastscan = 0; // ms for timing wifi scans
unsigned long _startscan = 0; // ms for timing wifi scans
int _cpclosedelay = 2000; // delay before wifisave, prevents captive portal from closing to fast.
bool _cleanConnect = true; // disconnect before connect in connectwifi, increases stability on connects
bool _cleanConnect = false; // disconnect before connect in connectwifi, increases stability on connects
bool _disableSTA = false; // disable sta when starting ap, always
bool _disableSTAConn = true; // disable sta when starting ap, if sta is not connected ( stability )