Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiconnection server can't handle Connection Reset events #210

Open
sscaglia opened this issue Jun 27, 2021 · 0 comments
Open

Multiconnection server can't handle Connection Reset events #210

sscaglia opened this issue Jun 27, 2021 · 0 comments

Comments

@sscaglia
Copy link

It seems the Muli-connection server example doesn't properly handle the Connection Reset Error;

Traceback (most recent call last):
  File "server.py", line 65, in <module>
    service_connection(key, mask)
  File "server.py", line 24, in service_connection
    recv_data = sock.recv(1024)  # Should be ready to read
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

This error occurs when, for example, the Windows Command Prompt running the client.py (connected to the server) is closed. In this case, a peer reset is sent to the server, but since the server can't handle it, it simply exits with the above error.

Is there any specific event to catch this error and avoid breaking the server?

Thanks
SS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant