mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-19 16:50:12 +01:00
Set getLocalTime timeout to 0 to prevent watchdog triggers
This happens especially when no WiFi is configured and the user enters the NTP info page
This commit is contained in:
@@ -35,7 +35,7 @@ void WebApiNtpClass::onNtpStatus(AsyncWebServerRequest* request)
|
||||
root[F("ntp_timezone_descr")] = config.Ntp_TimezoneDescr;
|
||||
|
||||
struct tm timeinfo;
|
||||
if (!getLocalTime(&timeinfo)) {
|
||||
if (!getLocalTime(&timeinfo, 0)) {
|
||||
root[F("ntp_status")] = false;
|
||||
} else {
|
||||
root[F("ntp_status")] = true;
|
||||
|
||||
Reference in New Issue
Block a user