Open
Description
I have NTPClient on a remote ESP32 monitor that checks the time once a day normally. If it fails, it tries again in half an hour. It has been running fine since late 2020.
A few day ago timeClient.update()
and timeClient.forceUpdate()
quit working. It has been trying and failing every half hour and sending me an email that it failed 48 times a day for several days.
I ran it at home on a different ESP and confirmed that it does not work and that it isn't just the remote environment.
My code is based on the randomnerdtutorials code which seems pretty standard. I added a timeout giving 20 tries. It never completes. At home I gave it infinite tries and it never is successful.
int counter = 0;
while(!timeClient.update() && counter < 20) {
timeClient.forceUpdate();
delay(500);
counter++;
Serial.print("+");
}
I know this code is good because it worked for over a year.