File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1131,9 +1131,13 @@ void wifiUpdateSettings()
1131
1131
// Remember the change in SSID values
1132
1132
wifiStationSsidSet = ssidSet;
1133
1133
1134
- // If WiFi currently has connectivity, don't restart it
1135
- if (networkHasInternet () == false )
1134
+ // If there are consumers, and WiFi currently has connectivity, don't restart it
1135
+ if ((networkConsumerCount (NETWORK_WIFI_STATION) > 0 ) && (networkHasInternet () == false ))
1136
+ {
1137
+ if (settings.debugWifiState )
1138
+ systemPrintln (" Restarting WiFi because settings have changed" );
1136
1139
wifiStationRestart = ssidSet;
1140
+ }
1137
1141
1138
1142
// Determine if the WiFi soft AP SSID string is present
1139
1143
wifiSoftApSsidSet = (wifiSoftApSsid && strlen (wifiSoftApSsid));
@@ -1343,9 +1347,6 @@ bool RTK_WIFI::enable(bool enableESPNow,
1343
1347
// Update the station state
1344
1348
if (enableStation)
1345
1349
{
1346
- // Load the latest settings
1347
- wifiUpdateSettings ();
1348
-
1349
1350
// Verify that at least one SSID is set
1350
1351
if (wifiStationSsidSet == false )
1351
1352
{
You can’t perform that action at this time.
0 commit comments