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
This commit is contained in:
Paul Sokolovsky 2017-06-03 22:32:07 +03:00
parent 43f58386e0
commit a0dbbbebb8
1 changed files with 1 additions and 1 deletions

View File

@ -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) {
mp_raise_OSError(MP_ETIMEDOUT);
mp_raise_OSError(MP_EINPROGRESS);
}
} else {
while (socket->state == STATE_CONNECTING) {