Fix connected UDPSocket filtering

Was dropping all packets from connected peer
pull/7336/head
Seppo Takalo 2018-06-26 17:01:19 +03:00
parent f3424da060
commit f2c0c4e248
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ nsapi_size_or_error_t UDPSocket::recvfrom(SocketAddress *address, void *buffer,
nsapi_size_or_error_t recv = _stack->socket_recvfrom(_socket, address, buffer, size);
// Filter incomming packets using connected peer address
if (recv >= 0 && _remote_peer && _remote_peer == *address) {
if (recv >= 0 && _remote_peer && _remote_peer != *address) {
continue;
}