Replies: 1 comment 15 replies
-
To reject a user in the connect handler you have to return |
Beta Was this translation helpful? Give feedback.
15 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
First of all, thank you for your work !
Here is my setup:
And the definition of
socketio
(application
is a normal Flask application.):The server is ran using
socketio.run(application, debug=True, port=5000)
.Here is my client testing file:
The idea behind this is, when the page is loaded (Not this simple html/js page, but a react frontend), a socketio connection is created betweeen the client (user, on the website) and the server (the backend, using Flask, flask-jwt-extended and flask-socketio.)
Everything is running great, except when I have an expired token sent in the query string, which might happen, so I want to close the connection because we cannot allow an unauthentified user to use the sockets.
When I use the
Connect
button on the html page, Here are the logs thrown by the Flask application.I cannot figure out where the error comes from and why I am getting a
1005
error and then aOSError
. I thought it might be the fact that I send ansend
and anack
at the end, but these are after areturn
clause if one of the conditions fails.Any thoughts on this ?
Beta Was this translation helpful? Give feedback.
All reactions