Skip to content

Commit 2ec0ee0

Browse files
committed
py/moduerrno: Add ECONNREFUSED, one of frequent networking errors.
1 parent 7c004e7 commit 2ec0ee0

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

py/moduerrno.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
X(ENOBUFS) \
5454
X(ENOTCONN) \
5555
X(ETIMEDOUT) \
56+
X(ECONNREFUSED) \
5657
X(EHOSTUNREACH) \
5758
X(EALREADY) \
5859
X(EINPROGRESS) \

py/mperrno.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
#define MP_ENOBUFS (105) // No buffer space available
7676
#define MP_ENOTCONN (107) // Transport endpoint is not connected
7777
#define MP_ETIMEDOUT (110) // Connection timed out
78+
#define MP_ECONNREFUSED (111) // Connection refused
7879
#define MP_EHOSTUNREACH (113) // No route to host
7980
#define MP_EALREADY (114) // Operation already in progress
8081
#define MP_EINPROGRESS (115) // Operation now in progress
@@ -128,6 +129,7 @@
128129
#define MP_ENOBUFS ENOBUFS
129130
#define MP_ENOTCONN ENOTCONN
130131
#define MP_ETIMEDOUT ETIMEDOUT
132+
#define MP_ECONNREFUSED ECONNREFUSED
131133
#define MP_EHOSTUNREACH EHOSTUNREACH
132134
#define MP_EALREADY EALREADY
133135
#define MP_EINPROGRESS EINPROGRESS

0 commit comments

Comments
 (0)