Commit a0dbbbeb authored by Paul Sokolovsky's avatar Paul Sokolovsky

extmod/modlwip: connect: For non-blocking mode, return EINPROGRESS.

Instead of ETIMEDOUT. This is consistent with POSIX:
http://pubs.opengroup.org/onlinepubs/7908799/xns/connect.html
parent 43f58386
...@@ -822,7 +822,7 @@ STATIC mp_obj_t lwip_socket_connect(mp_obj_t self_in, mp_obj_t addr_in) { ...@@ -822,7 +822,7 @@ STATIC mp_obj_t lwip_socket_connect(mp_obj_t self_in, mp_obj_t addr_in) {
if (socket->state != STATE_CONNECTING) break; if (socket->state != STATE_CONNECTING) break;
} }
if (socket->state == STATE_CONNECTING) { if (socket->state == STATE_CONNECTING) {
mp_raise_OSError(MP_ETIMEDOUT); mp_raise_OSError(MP_EINPROGRESS);
} }
} else { } else {
while (socket->state == STATE_CONNECTING) { while (socket->state == STATE_CONNECTING) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment