Skip to content

Commit a0dbbbe

Browse files
committed
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
1 parent 43f5838 commit a0dbbbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extmod/modlwip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ STATIC mp_obj_t lwip_socket_connect(mp_obj_t self_in, mp_obj_t addr_in) {
822822
if (socket->state != STATE_CONNECTING) break;
823823
}
824824
if (socket->state == STATE_CONNECTING) {
825-
mp_raise_OSError(MP_ETIMEDOUT);
825+
mp_raise_OSError(MP_EINPROGRESS);
826826
}
827827
} else {
828828
while (socket->state == STATE_CONNECTING) {

0 commit comments

Comments
 (0)