Pico w: socket: Correctly return negative error code from recv_into
This commit is contained in:
parent
62cbd3bcd8
commit
ca9523b814
1 changed files with 3 additions and 0 deletions
|
|
@ -1080,6 +1080,9 @@ int socketpool_socket_recv_into(socketpool_socket_obj_t *socket,
|
||||||
ret = lwip_raw_udp_receive(socket, (byte *)buf, len, NULL, NULL, &_errno);
|
ret = lwip_raw_udp_receive(socket, (byte *)buf, len, NULL, NULL, &_errno);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (ret < 0) {
|
||||||
|
return -_errno;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue