From 032bf63f2dc79c231221b2315779b16f9b9bcb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georg=20B=C3=B8e?= Date: Tue, 25 Oct 2022 22:53:01 +0200 Subject: [PATCH] Raise error with positive code in recv_into for espressif --- ports/espressif/common-hal/socketpool/Socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/socketpool/Socket.c b/ports/espressif/common-hal/socketpool/Socket.c index f6025d329c..53db7ab393 100644 --- a/ports/espressif/common-hal/socketpool/Socket.c +++ b/ports/espressif/common-hal/socketpool/Socket.c @@ -483,7 +483,7 @@ int socketpool_socket_recv_into(socketpool_socket_obj_t *self, mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t *self, const uint8_t *buf, uint32_t len) { int received = socketpool_socket_recv_into(self, buf, len); if (received < 0) { - mp_raise_OSError(received); + mp_raise_OSError(-received); } return received; }