File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -493,22 +493,18 @@ NetworkConfiguratorStates NetworkConfiguratorClass::handleConnecting() {
493493
494494NetworkConfiguratorStates NetworkConfiguratorClass::handleConfigured () {
495495 NetworkConfiguratorStates nextState = _state;
496- bool peerConnected = false ;
496+ // Return if the user is still connected to the agent, but has just finished configuring the network
497497 if (_agentManager->isConfigInProgress ()) {
498- peerConnected = true ;
499- } else {
500- AgentsManagerStates agManagerState = _agentManager->poll ();
501- // If the agent manager changes state, it means that user is trying to configure the network, so the network configurator should change state
502- if (agManagerState != AgentsManagerStates::INIT && agManagerState != AgentsManagerStates::END) {
503- peerConnected = true ;
504- }
498+ return nextState;
505499 }
506500
507- if (peerConnected) {
501+ _agentManager->poll ();
502+ // If the agent manager changes state, it means that user is trying to configure the network, so the network configurator should change state
503+ if (_agentManager->isConfigInProgress ()) {
508504 nextState = NetworkConfiguratorStates::UPDATING_CONFIG;
509505
510506#ifdef BOARD_HAS_WIFI
511- updateNetworkOptions ();
507+ updateNetworkOptions ();
512508#endif
513509 }
514510
You can’t perform that action at this time.
0 commit comments