We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab22d5a commit 62cbd3bCopy full SHA for 62cbd3b
ports/raspberrypi/common-hal/socketpool/Socket.c
@@ -821,6 +821,16 @@ socketpool_socket_obj_t *common_hal_socketpool_socket_accept(socketpool_socket_o
821
822
MICROPY_PY_LWIP_EXIT
823
824
+ DEBUG_printf("registering socket in socketpool_socket_accept()\n");
825
+ if (!register_open_socket(socket2)) {
826
+ DEBUG_printf("collecting garbage to open socket\n");
827
+ gc_collect();
828
829
+ mp_raise_RuntimeError(translate("Out of sockets"));
830
+ }
831
832
+ mark_user_socket(socket2);
833
+
834
// output values
835
memcpy(ip, &(socket2->pcb.tcp->remote_ip), NETUTILS_IPV4ADDR_BUFSIZE);
836
*port = (mp_uint_t)socket2->pcb.tcp->remote_port;
0 commit comments