From 5ee1ae78c0fc808ad5eacec398d19a658ec35aa3 Mon Sep 17 00:00:00 2001 From: tablatronix Date: Fri, 10 Aug 2018 11:45:25 -0500 Subject: [PATCH] fix callback order --- WiFiManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index fac7af1..90a7970 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -304,6 +304,11 @@ bool WiFiManager::startAP(){ bool ret = true; DEBUG_WM(F("StartAP with SSID: "),_apName); + // do AP callback if set + if ( _apcallback != NULL) { + _apcallback(this); + } + // setup optional soft AP static ip config if (_ap_static_ip) { DEBUG_WM(F("Custom AP IP/GW/Subnet:")); @@ -347,11 +352,6 @@ bool WiFiManager::startAP(){ } #endif - // do AP callback if set - if ( _apcallback != NULL) { - _apcallback(this); - } - return ret; }