Skip to content

Commit a2bc22a

Browse files
committed
Use correct error return code for remotePort
1 parent 55c050c commit a2bc22a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/WiFi/src/WiFiUdp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ uint16_t arduino::WiFiUDP::remotePort() {
166166
SocketAddress remoteAddress("");
167167

168168
if(_socket.getpeername(&remoteAddress) != NSAPI_ERROR_OK){
169-
return nullptr;
169+
return -1;
170170
}
171171

172172
return remoteAddress.get_port();

0 commit comments

Comments
 (0)