You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What appears to be happening here is that either the WebSocketMiddleware or perhaps the underlying uwsgi web socket implementation periodically pushes an empty string onto the receive queue, rather than using the "timeout" function of the queue.
If I had to guess, I'd say that this is a rather kludgy attempt to replicate the "timeout" functionality without raising the "Empty" exception that the timeout would raise. So an empty string is functionally equivalent to an "Empty" exception.
I could be missing something though - this is just my conclusion based on observed behavior and a light perusing of the code (where I never did find the actual code pushing the empty string). Would be nice if it was documented though, along with the fact that a return value of None means "connection closed"...
i have the following configuration on mac:
my app code is:
The
ws.recv()
call periodically receives some empty string''
messages from nowhere. Client doesn't send them.When i've plugged off the
flask
andflask-uwsgi-websocket
the following code worked fine:My uWSGI config is:
The text was updated successfully, but these errors were encountered: