Skip to content

Commit d4e9282

Browse files
committed
Bind socket to port
1 parent 52fc349 commit d4e9282

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/WiFi/src/WiFiUdp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ uint8_t arduino::WiFiUDP::begin(uint16_t port) {
2121
return 0;
2222
}
2323

24+
if (_socket.bind(port) < 0) {
25+
return 0; //Failed to bind UDP Socket to port
26+
}
27+
2428
if (!_packet_buffer) {
2529
return 0;
2630
}

0 commit comments

Comments
 (0)