mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
fix for numretries not bailing
This commit is contained in:
+1
-1
@@ -909,7 +909,7 @@ uint8_t WiFiManager::connectWifi(String ssid, String pass) {
|
||||
if(_cleanConnect) WiFi_Disconnect(); // disconnect before begin, in case anything is hung, this causes a 2 seconds delay for connect
|
||||
// @todo find out what status is when this is needed, can we detect it and handle it, say in between states or idle_status
|
||||
|
||||
while(retry <= _connectRetries){
|
||||
while(retry <= _connectRetries && (connRes!=WL_CONNECTED)){
|
||||
if(_connectRetries > 1){
|
||||
#ifdef WM_DEBUG_LEVEL
|
||||
DEBUG_WM(F("Connect Wifi, ATTEMPT #"),(String)retry+" of "+(String)_connectRetries);
|
||||
|
||||
Reference in New Issue
Block a user