Dec-05-2017, 11:35 AM
Hi folks.
I have the following code running in a loop for accepting socket connections...
clientsocket, clientaddr = serversocket.accept()
clients.append(clientsocket)
thread.start_new_thread(handler, (clientsocket, clientaddr))
This works fine, but there is a huge CPU hole when clients disconnect. Now, I'm obviously not checking the clients list to see if anyone has dropped.
How do I do that?
Many thanks.
I have the following code running in a loop for accepting socket connections...
clientsocket, clientaddr = serversocket.accept()
clients.append(clientsocket)
thread.start_new_thread(handler, (clientsocket, clientaddr))
This works fine, but there is a huge CPU hole when clients disconnect. Now, I'm obviously not checking the clients list to see if anyone has dropped.
How do I do that?
Many thanks.