Replies: 1 comment
-
You cannot have blocking calls in the connect handler. The purpose of the connect handler is to quickly accept or reject a connection. If your authentication needs are complex, then accept the connection in the connect handler and then perform additional authentication in a regular event handler, which can use the call() method. If authentication fails you can then disconnect the user. |
Beta Was this translation helpful? Give feedback.
0 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using gevent for flask socketio async. When i invoke call() function to a client and the client acks back, the call() function blocks until timeout and then get the callback. Looks like the call already expires and I received a None because of that.
How does the blocking call work? Does it use the async mode configured in the app to block? It seems to have the same behavior as gevent queue.get(), which also has a blocking call, and that seems to block my callback as well...
I am trying to set up a blocking call in on_connect() to further authenticate the client. Is that why the callback is getting blocked?
Beta Was this translation helpful? Give feedback.
All reactions