extmod/modlwip: lwip_tcp_receive: Properly map lwIP error to POSIX errno.
This commit is contained in:
parent
ba8f7d5171
commit
0779409d0d
|
@ -396,7 +396,8 @@ STATIC mp_uint_t lwip_tcp_receive(lwip_socket_obj_t *socket, byte *buf, mp_uint_
|
|||
return 0;
|
||||
}
|
||||
} else if (socket->state != STATE_CONNECTED) {
|
||||
*_errno = -socket->state;
|
||||
assert(socket->state < 0);
|
||||
*_errno = error_lookup_table[-socket->state];
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue