Cannot send events from 'disconnect' event handler of Flask-SocketIO server #2046
Unanswered
ThomasHerondale
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Do you have logs for a complete session leading to this error? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm building a simple presence announcement system using Flask-SocketIO for my server.
My idea was to detect every 'connect'/'disconnect' event on the server and broadcast to all online users a 'presence' event that correctly indicates whether User A has just connected or disconnected.
The 'connect' handler, i.e. the handler that dispatches the 'User A has come online' presence works well; the problem has to do with the 'disconnect' one, since trying to send/emit an event from that handler gets me this error:
Here is my code:
Beta Was this translation helpful? Give feedback.
All reactions