diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-06-04 12:30:41 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-06-04 12:30:41 +0300 |
commit | 5da8de2b66d3f43107e1e745afa9bb6a4bf601eb (patch) | |
tree | d981fc5239deb6e6fe841d9add2c69530b5b0299 /py | |
parent | a0dbbbebb8c0286e00ae06751b0173cbca4ec801 (diff) | |
download | micropython-5da8de2b66d3f43107e1e745afa9bb6a4bf601eb.tar.gz micropython-5da8de2b66d3f43107e1e745afa9bb6a4bf601eb.zip |
extmod/modlwip: Fix error codes for duplicate calls to connect().
If socket is already connected, POSIX requires returning EISCONN. If
connection was requested, but not yet complete (for non-blocking
socket), error code is EALREADY.
http://pubs.opengroup.org/onlinepubs/7908799/xns/connect.html
Diffstat (limited to 'py')
-rw-r--r-- | py/mperrno.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/mperrno.h b/py/mperrno.h index 4d092de452..6ea99ae227 100644 --- a/py/mperrno.h +++ b/py/mperrno.h @@ -73,6 +73,7 @@ #define MP_ECONNABORTED (103) // Software caused connection abort #define MP_ECONNRESET (104) // Connection reset by peer #define MP_ENOBUFS (105) // No buffer space available +#define MP_EISCONN (106) // Transport endpoint is already connected #define MP_ENOTCONN (107) // Transport endpoint is not connected #define MP_ETIMEDOUT (110) // Connection timed out #define MP_ECONNREFUSED (111) // Connection refused @@ -127,6 +128,7 @@ #define MP_ECONNABORTED ECONNABORTED #define MP_ECONNRESET ECONNRESET #define MP_ENOBUFS ENOBUFS +#define MP_EISCONN EISCONN #define MP_ENOTCONN ENOTCONN #define MP_ETIMEDOUT ETIMEDOUT #define MP_ECONNREFUSED ECONNREFUSED |