Open freezed opened 6 years ago
Hi @freezed, that's a 4 years old piece of code. Honestly, I don't remember exactly. What I can tell from reading the code is that if client connection drops in between and we try to receive data from that socket connection, it will throw an exception. Hence, we catch that exception and remove that client from our list of existing connections.
Let me know if this clears your doubt.
Hu hu, no problems! I put this block in my code but I did not find the case when server listen a client disconnecting… so I used a keyword to tell it.
Sockets
& Select
seems to be nice tools, but I need practice more to understand correctly how they work.
Thanks and feel free to close this issue.
Hi, I'm new in python and I am discovering networking with
socket
andselect
. I am auditing your code and I wonder in which situation thetry/except
bloc (lines: 40-49, inchat_server.py
) could raise an exception.Thanks -- freezed