-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Websocket connect attempts to send message to closing connection #1933
Labels
Comments
FabioRosado
changed the title
Websocket connect might not close properly
Websocket connect attempts to send message to closing connection
Jun 19, 2022
Hi, I'd like to work on this! |
Hi, please go ahead 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
While testing opsdroid-web it seems that sometimes the connection with opsdroid drops. If I try to reconnect from the opsdroid-web, the connection happens, but then when opsdroid tries to talk back to the socket, an error occurs:
I believe that the issue is happening on the following line:
opsdroid/opsdroid/connector/websocket/__init__.py
Line 183 in a280177
Opsdroid-web doesn't yet send the socket in which it's connected to opsdroid, so when we do
next(iter(...))
we get the first socket which is closing.Steps to Reproduce
Leave opsdroid running for a while, let your computer hibernate and try to connect to the websocket again send a basic message such as 'hello' and see the error
Expected Functionality
Opsdroid should remove closing/closed connections from
self.active_connections
currently we only remove sockets fromself.active_connections
when we are disconnecting the connector.Experienced Functionality
Opsdroid tries to reply to a closing connection
Versions
Configuration File
Please include your version of the configuration file below.
Additional Details
Any other details you wish to include such as screenshots, console messages, etc.
The text was updated successfully, but these errors were encountered: