-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
websockets close unexpected behavior #3550
Comments
Hello I saw all the possible related issues and none one applies. The closest is issue 754 and it talks about how to close the client websocket connection. My case applies for web sockets closed by server request. |
Hello, @lmarent, there has been no activity here for the last 3 years, can you confirm that this is still a problem? Also I've reviewed your code and suggest that you consider using |
Long story short
unexpected processing during shutdown
Expected behaviour
I am writing a server code that connects clients though WebSockets. The server that I coded calls the close all Websockets connected (maintained in a set as the documentation recommends), and I expect the code calls the close() method of the websocket as many time as web sockets are connected.
Actual behaviour
Right now, there is only one close being called. After the first call, it is like the server continues executing the rest of the shutdown processing.
Steps to reproduce
Start the server with python server.py
Start two clients with with python client.py
Ctrl-C on the sever and you only see one print with the label closing websocket
Your environment
OS: UBUNTU 16.04
Python: 3.6
Libraries Installed
aiohttp==3.5.1
async-timeout==3.0.1
attrs==18.2.0
chardet==3.0.4
idna==2.8
idna-ssl==1.1.0
multidict==4.5.2
typing-extensions==3.6.6
yarl==1.3.0
files.zip
The text was updated successfully, but these errors were encountered: