some checks

This commit is contained in:
MichaelDvP
2025-07-10 12:09:17 +02:00
parent 6c42cbfb4b
commit 4b2468d616
3 changed files with 15 additions and 11 deletions

View File

@@ -25,7 +25,7 @@ void NTPSettingsService::WiFiEvent(WiFiEvent_t event) {
switch (event) {
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
case ARDUINO_EVENT_ETH_DISCONNECTED:
if (_connected) {
if (_connected && emsesp::EMSESP::system_.ntp_connected()) {
emsesp::EMSESP::logger().info("WiFi connection dropped, stopping NTP");
_connected = false;
configureNTP();