Merge pull request #62 from jbrown123/master
Added packet flush before request in forceUpdate(). Fixes issue #49 - random clock delay
This commit is contained in:
commit
18d4ac7eb1
@ -65,6 +65,10 @@ bool NTPClient::forceUpdate() {
|
|||||||
Serial.println("Update from NTP Server");
|
Serial.println("Update from NTP Server");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// flush any existing packets
|
||||||
|
while(this->_udp->parsePacket() != 0)
|
||||||
|
this->_udp->flush();
|
||||||
|
|
||||||
this->sendNTPPacket();
|
this->sendNTPPacket();
|
||||||
|
|
||||||
// Wait till data is there or timeout...
|
// Wait till data is there or timeout...
|
||||||
|
Loading…
Reference in New Issue
Block a user