diff --git a/py/moduerrno.c b/py/moduerrno.c index c7f2aacdfd..343b29ba08 100644 --- a/py/moduerrno.c +++ b/py/moduerrno.c @@ -53,6 +53,7 @@ X(ENOBUFS) \ X(ENOTCONN) \ X(ETIMEDOUT) \ + X(ECONNREFUSED) \ X(EHOSTUNREACH) \ X(EALREADY) \ X(EINPROGRESS) \ diff --git a/py/mperrno.h b/py/mperrno.h index f7784f6f73..4d092de452 100644 --- a/py/mperrno.h +++ b/py/mperrno.h @@ -75,6 +75,7 @@ #define MP_ENOBUFS (105) // No buffer space available #define MP_ENOTCONN (107) // Transport endpoint is not connected #define MP_ETIMEDOUT (110) // Connection timed out +#define MP_ECONNREFUSED (111) // Connection refused #define MP_EHOSTUNREACH (113) // No route to host #define MP_EALREADY (114) // Operation already in progress #define MP_EINPROGRESS (115) // Operation now in progress @@ -128,6 +129,7 @@ #define MP_ENOBUFS ENOBUFS #define MP_ENOTCONN ENOTCONN #define MP_ETIMEDOUT ETIMEDOUT +#define MP_ECONNREFUSED ECONNREFUSED #define MP_EHOSTUNREACH EHOSTUNREACH #define MP_EALREADY EALREADY #define MP_EINPROGRESS EINPROGRESS