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:
Frank
2023-06-21 00:29:16 +02:00
parent 8aef4347a1
commit 708cd8e73d
2 changed files with 4 additions and 0 deletions

View File

@@ -226,6 +226,7 @@ void sendNTPPacket()
bool checkNTPResponse()
{
ntpUdp.flush();
int cb = ntpUdp.parsePacket();
if (!cb) return false;