File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -1332,9 +1332,19 @@ void networkUpdate()
1332
1332
// If there are no consumers, but the network is online, shut down all networks
1333
1333
if (networkConsumers () == 0 && networkIsOnline () == true )
1334
1334
{
1335
- // Shutdown all networks
1336
- for (int index = 0 ; index < NETWORK_OFFLINE; index++)
1337
- networkStop (index, settings.debugNetworkLayer );
1335
+
1336
+ if (systemState == STATE_WIFI_CONFIG)
1337
+ {
1338
+ // The STATE_WIFI_CONFIG is in control of WiFi. Don't allow the network layer to shut it down
1339
+ // As OTA exits, we need to keep AP running if we are in Web Config mode
1340
+ // We don't want to make STATE_WIFI_CONFIG a consumer until startWebServer() uses the network layer
1341
+ }
1342
+ else
1343
+ {
1344
+ // Shutdown all networks
1345
+ for (int index = 0 ; index < NETWORK_OFFLINE; index++)
1346
+ networkStop (index, settings.debugNetworkLayer );
1347
+ }
1338
1348
}
1339
1349
1340
1350
// Allow consumers to start networks
@@ -1528,7 +1538,7 @@ uint8_t networkConsumers()
1528
1538
consumerType |= (1 << 7 );
1529
1539
}
1530
1540
1531
- // Network needed for to start a firmware update
1541
+ // Network needed to start a firmware update
1532
1542
if (otaRequestFirmwareUpdate == true )
1533
1543
{
1534
1544
consumerCount++;
You can’t perform that action at this time.
0 commit comments