Skip to content

Commit e34744a

Browse files
committed
Prevent WiFi restart if there is no consumers
1 parent 1cee8e8 commit e34744a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,13 @@ void wifiRestart()
441441
{
442442
// Restart WiFi if we are not in AP config mode
443443
WIFI_STOP();
444+
445+
if (networkConsumers() == 0)
446+
{
447+
// Don't restart WiFi if there is no need for it
448+
return;
449+
}
450+
444451
wifiStart();
445452
}
446453
}

0 commit comments

Comments
 (0)