You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flush at the start of ntpUpdate() is mandatory to keep the NTP server in sync after an UDP timeout.
If you leave out the flush sometimes suddenly an exact NTP::updateInterval timeshift will happen.
The flush at the start of ntpUpdate() is mandatory to keep the NTP server in sync after an UDP timeout.
If you leave out the flush sometimes suddenly an exact NTP::updateInterval timeshift will happen.
The code I use to fix this was:
bool NTP::ntpUpdate() {
// flush any existing pending input packets
while(udp->parsePacket() != 0) udp->flush();
if (server == nullptr) udp->beginPacket(serverIP, NTP_PORT);
else udp->beginPacket(server, NTP_PORT);
The text was updated successfully, but these errors were encountered: