uPyEcho icon indicating copy to clipboard operation
uPyEcho copied to clipboard

BUG: socket collections grow unchecked

Open Beormund opened this issue 3 years ago • 0 comments

https://github.com/lemariva/uPyEcho/blob/e09c28db2a4594b68d0c2ee1d1784bbf84137733/main.py#L298-L302

self.client_sockets dictionary of sockets keeps growing unchecked. You need to pop each client socket when no data is received:

self.client_sockets.pop(fileno)

Also, in the poller.remove() function you need to remove the socket from self.targets:

https://github.com/lemariva/uPyEcho/blob/e09c28db2a4594b68d0c2ee1d1784bbf84137733/main.py#L197-L203

self.targets.pop(socket.fileno())

Beormund avatar Oct 13 '22 13:10 Beormund