Fix stubs, recv_into error

This commit is contained in:
Lucian Copeland 2020-12-21 13:04:52 -05:00
parent 32736dd2c3
commit 75620884e6
2 changed files with 2 additions and 2 deletions

View File

@ -210,7 +210,7 @@ mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self,
if (received == 0) { if (received == 0) {
// socket closed // socket closed
common_hal_socketpool_socket_close(self); mp_raise_OSError(0);
} }
return received; return received;
} }

View File

@ -105,7 +105,7 @@ STATIC mp_obj_t socketpool_socket_listen(mp_obj_t self_in, mp_obj_t backlog_in)
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_listen_obj, socketpool_socket_listen); STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_listen_obj, socketpool_socket_listen);
//| def accept(self) -> tuple: //| def accept(self) -> Tuple[Socket, Tuple[str, int]]:
//| """Accept a connection on a listening socket of type SOCK_STREAM, //| """Accept a connection on a listening socket of type SOCK_STREAM,
//| creating a new socket of type SOCK_STREAM. //| creating a new socket of type SOCK_STREAM.
//| Returns a tuple of (new_socket, remote_address)""" //| Returns a tuple of (new_socket, remote_address)"""