free udp receive buffers before parsePacket
robustness improvement - parsepacket() will fail if the udp handler still has an active receive buffer.
This commit is contained in:
@@ -226,6 +226,7 @@ void sendNTPPacket()
|
||||
|
||||
bool checkNTPResponse()
|
||||
{
|
||||
ntpUdp.flush();
|
||||
int cb = ntpUdp.parsePacket();
|
||||
if (!cb) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user