From 3c280b12a84bd5eb68de1f39133512170c2dda3a Mon Sep 17 00:00:00 2001 From: tablatronix Date: Fri, 12 Oct 2018 15:16:59 -0500 Subject: [PATCH] moved apcallback after webserver is available --- WiFiManager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index e9f71bd..5a79cbe 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -343,10 +343,9 @@ bool WiFiManager::startAP(){ } } - if(_channelSync){ DEBUG_WM(DEBUG_VERBOSE,"Starting AP on channel:",WiFi.channel()); - } + } // start soft AP with password or anonymous if (_apPassword != "") { @@ -384,10 +383,6 @@ bool WiFiManager::startAP(){ } #endif - // do AP callback if set - if ( _apcallback != NULL) { - _apcallback(this); - } return ret; } @@ -530,6 +525,11 @@ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPasswo DEBUG_WM(DEBUG_DEV,F("setupConfigPortal")); setupConfigPortal(); + // do AP callback if set + if ( _apcallback != NULL) { + _apcallback(this); + } + if(!_configPortalIsBlocking){ DEBUG_WM(DEBUG_VERBOSE,F("Config Portal Running, non blocking/processing")); return result;