-
-
Notifications
You must be signed in to change notification settings - Fork 888
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
ConnectionRefusedError doest not reject connection #1279
Comments
This has been reported already: miguelgrinberg/python-socketio#391. I'm going to close this one as a duplicate since this issue is already on my radar and there is a lot of information in the referenced issue. |
@miguelgrinberg
Is that right? |
@1111mp the client should be exited on its own, unless maybe if you are connecting multiple namespaces and there is at least one that connected successfully. If you have a simple client and server example that you can give me to test this I'd appreciate it. |
@miguelgrinberg I will post one of the simplest demo code:
I used pipenv,This is Pipfile file:
client(html file):
python 3.9.1. windows10. |
@1111mp When you asked me about the behavior of the client I assumed your were using a Python based client. You are using a JavaScript client, so I cannot really answer for the behavior of that client. Maybe with that client you do have to call disconnect when you get a connection error. I have no control in that case. |
Old but worth mentioning - @1111mp your observation seems to be right. When you get a I suspect it has to be with some sort of reconnection mechanism or maybe expecting another connect / reconnect but I'm not sure nor can't find any reference of that in the client source code. For me manually handling and executing |
Expected behavior
From docs, we can use ConnectionRefusedError to reject connection.
In fact connection is still established, even when returning False
To Reproduce
Logs
With lambda exception
Logs
The text was updated successfully, but these errors were encountered: