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() {
493
493
494
494
NetworkConfiguratorStates NetworkConfiguratorClass::handleConfigured () {
495
495
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
497
497
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;
505
499
}
506
500
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 ()) {
508
504
nextState = NetworkConfiguratorStates::UPDATING_CONFIG;
509
505
510
506
#ifdef BOARD_HAS_WIFI
511
- updateNetworkOptions ();
507
+ updateNetworkOptions ();
512
508
#endif
513
509
}
514
510
You can’t perform that action at this time.
0 commit comments