diff --git a/NTPClient.cpp b/NTPClient.cpp index 87b7a53..668d72b 100644 --- a/NTPClient.cpp +++ b/NTPClient.cpp @@ -65,6 +65,10 @@ bool NTPClient::forceUpdate() { Serial.println("Update from NTP Server"); #endif + // flush any existing packets + while(this->_udp->parsePacket() != 0) + this->_udp->flush(); + this->sendNTPPacket(); // Wait till data is there or timeout...