diff --git a/shared-bindings/socket/__init__.c b/shared-bindings/socket/__init__.c index c59724efcf..8e34c3700a 100644 --- a/shared-bindings/socket/__init__.c +++ b/shared-bindings/socket/__init__.c @@ -248,7 +248,7 @@ STATIC mp_int_t _socket_recv_into(mod_network_socket_obj_t *sock, byte *buf, mp_ if (ret == -1) { mp_raise_OSError(_errno); } - return len; + return ret; }