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 happens when SIGTERM is received varies depending on the web server that you are using. A proper handling of SIGTERM by the web server would close all open handles, which would in turn raise an exception on the receive() call. Not sure what web server you are using, but I would prefer to not add code in this package to compensate for web servers that don't do this correctly.
A just response. I'm using gunicorn (without gevent and eventlet at the moment). I'll see what it takes to get gunicorn to close IO handles on SIGTERM.
Repository owner
locked and limited conversation to collaborators
Oct 31, 2024
The handler in
examples/clock.py
looks like this:When terminating the server, the termination is held up because of the blocking call on
ws.receive()
. It would be better if we could do something likekeep_running
can be set up to returnFalse
if aSIG_TERM
was sent or whatever.Is there any way to get this type of non-blocking behavior?
The text was updated successfully, but these errors were encountered: