Added packet flush before request in forceUpdate(). Fixes issue #49 in the upstream repo
This commit is contained in:
parent
020aaf868d
commit
cfbe88a3e2
@ -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...
|
||||
|
Loading…
Reference in New Issue
Block a user