esp32/modsocket: Convert EADDRINUSE error code from lwip return value.
This commit is contained in:
parent
5f91933e54
commit
5a755ac30a
|
@ -155,7 +155,9 @@ void usocket_events_handler(void) {
|
||||||
|
|
||||||
NORETURN static void exception_from_errno(int _errno) {
|
NORETURN static void exception_from_errno(int _errno) {
|
||||||
// Here we need to convert from lwip errno values to MicroPython's standard ones
|
// Here we need to convert from lwip errno values to MicroPython's standard ones
|
||||||
if (_errno == EINPROGRESS) {
|
if (_errno == EADDRINUSE) {
|
||||||
|
_errno = MP_EADDRINUSE;
|
||||||
|
} else if (_errno == EINPROGRESS) {
|
||||||
_errno = MP_EINPROGRESS;
|
_errno = MP_EINPROGRESS;
|
||||||
}
|
}
|
||||||
mp_raise_OSError(_errno);
|
mp_raise_OSError(_errno);
|
||||||
|
|
Loading…
Reference in New Issue