We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5da8de2 commit 50de6d2Copy full SHA for 50de6d2
1 file changed
extmod/modlwip.c
@@ -732,7 +732,9 @@ STATIC mp_obj_t lwip_socket_accept(mp_obj_t self_in) {
732
733
// accept incoming connection
734
if (socket->incoming.connection == NULL) {
735
- if (socket->timeout != -1) {
+ if (socket->timeout == 0) {
736
+ mp_raise_OSError(MP_EAGAIN);
737
+ } else if (socket->timeout != -1) {
738
for (mp_uint_t retries = socket->timeout / 100; retries--;) {
739
mp_hal_delay_ms(100);
740
if (socket->incoming.connection != NULL) break;
0 commit comments