diff --git a/src/drivers/ninaw10/src/nina.c b/src/drivers/ninaw10/src/nina.c index 4a69cd361..663bf91ad 100644 --- a/src/drivers/ninaw10/src/nina.c +++ b/src/drivers/ninaw10/src/nina.c @@ -702,7 +702,7 @@ int nina_socket_accept(int fd, uint8_t *ip, uint16_t *port, int *fd_out, uint32_ return -1; } - for (mp_uint_t start = mp_hal_ticks_ms(); sock == 0 || sock == NO_SOCKET_AVAIL; mp_hal_delay_ms(100)) { + for (mp_uint_t start = mp_hal_ticks_ms(); sock == 0 || sock == NO_SOCKET_AVAIL; mp_hal_delay_ms(10)) { if (nina_send_command_read_vals(AVAIL_DATA_TCP_CMD, 1, ARG_8BITS, NINA_ARGS(ARG_BYTE(fd)), 1, ARG_8BITS, NINA_VALS({&size, &sock})) != 0) { diff --git a/src/omv/ports/rp2/modules/py_nina.c b/src/omv/ports/rp2/modules/py_nina.c index 918faa771..a8e9d385a 100644 --- a/src/omv/ports/rp2/modules/py_nina.c +++ b/src/omv/ports/rp2/modules/py_nina.c @@ -518,11 +518,7 @@ static int py_nina_socket_settimeout(mod_network_socket_obj_t *socket, mp_uint_t if (timeout_ms == UINT32_MAX) { // no timeout is given, set the socket to blocking mode. timeout_ms = 0; - } else if (timeout_ms == 0) { - // non-blocking mode, set the timeout to a small number other than zero. - timeout_ms = 10; - } // otherwise, timeout is provided. - + } socket->timeout = timeout_ms; return 0; }