From 080f7751e021d2828b401ef59a06c2c6330207dd Mon Sep 17 00:00:00 2001 From: tablatronix Date: Fri, 12 Oct 2018 14:52:10 -0500 Subject: [PATCH] moving apcallback after everything --- WiFiManager.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 818e20e..e9f71bd 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -370,11 +370,6 @@ bool WiFiManager::startAP(){ if(!ret) DEBUG_WM(DEBUG_ERROR,"[ERROR] There was a problem starting the AP"); // @todo add softAP retry here - - // do AP callback if set - if ( _apcallback != NULL) { - _apcallback(this); - } delay(500); // slight delay to make sure we get an AP IP DEBUG_WM(F("AP IP address:"),WiFi.softAPIP()); @@ -389,6 +384,10 @@ bool WiFiManager::startAP(){ } #endif + // do AP callback if set + if ( _apcallback != NULL) { + _apcallback(this); + } return ret; }