Skip to content

Commit f2c0c4e

Browse files
author
Seppo Takalo
committed
Fix connected UDPSocket filtering
Was dropping all packets from connected peer
1 parent f3424da commit f2c0c4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/netsocket/UDPSocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ nsapi_size_or_error_t UDPSocket::recvfrom(SocketAddress *address, void *buffer,
124124
nsapi_size_or_error_t recv = _stack->socket_recvfrom(_socket, address, buffer, size);
125125

126126
// Filter incomming packets using connected peer address
127-
if (recv >= 0 && _remote_peer && _remote_peer == *address) {
127+
if (recv >= 0 && _remote_peer && _remote_peer != *address) {
128128
continue;
129129
}
130130

0 commit comments

Comments
 (0)