Skip to content

Commit 42d1123

Browse files
committed
- stop UDP to prevent socket to remain open (suggested by @facchinm)
1 parent 2c5ecf4 commit 42d1123

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utility/NTPUtils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ unsigned long NTPUtils::getTime() {
5959
while (!Udp.parsePacket() && (millis() - start < 10000)){}
6060
if (millis() - start >= 1000) {
6161
//timeout reached
62+
Udp.stop();
6263
return 0;
6364
}
6465
Udp.read(packetBuffer, NTP_PACKET_SIZE);

0 commit comments

Comments
 (0)