Skip to content

Commit

Permalink
fix: wifi activating before config load
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanzyTHEbar committed Dec 21, 2023
1 parent d4331dc commit 60dc0a3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions NetworkManager/src/EasyNetworkManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ EasyNetworkManager::EasyNetworkManager(
EasyNetworkManager::~EasyNetworkManager() {}

void EasyNetworkManager::begin() {
configHandler->config.attach("ConfigHandler", configHandler);
configHandler->config.attach("WiFiHandler", wifiHandler);
configHandler->config.attach(configHandler->getName(), configHandler);
configHandler->config.attach(wifiHandler->getName(), wifiHandler);
if (mdnsHandler != nullptr)
configHandler->config.attach("MDNSHandler", mdnsHandler);
configHandler->config.setState(wifiHandler->getName(),
WiFiState_e::WiFiState_Connecting);
configHandler->config.attach(mdnsHandler->getName(), mdnsHandler);

configHandler->begin();
wifiHandler->begin();

Expand Down

0 comments on commit 60dc0a3

Please sign in to comment.