Moved first loop into init to be in sync with doku

This commit is contained in:
Thomas Basler 2019-11-14 23:17:29 +01:00
parent 248cddd008
commit 41c9a4087a
2 changed files with 5 additions and 2 deletions

View File

@ -160,7 +160,11 @@ boolean IotWebConf::init()
MDNS.begin(this->_thingName);
MDNS.addService("http", "tcp", 80);
#endif
#ifdef USE_ESPASYNCWEBSERVER
// This is required to init wifi already within setup
// (Otherwise AsyncWebserver will crash on begin)
doLoop();
#endif
return validConfig;
}

View File

@ -173,7 +173,6 @@ void setup()
mqttUserNameValue[0] = '\0';
mqttUserPasswordValue[0] = '\0';
}
iotWebConf.doLoop();
// Init WebServer
rootHandler = new AsyncCallbackWebHandler();