Skip to content

Catches SystemExit #2113

Answered by miguelgrinberg
pw-64 asked this question in Q&A
Nov 24, 2024 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

But this is a web application, you can't just exit and expect everything will be gracefully cleaned up. As I said, each web server offers their own solution for shutting down.

For web servers started with socketio.run() you can stop the web server by calling socketio.stop() from inside a Socket.IO event handler. But this is currently not working when using the Flask web server, because this server used to support a clean exit, but this functionality was removed (see pallets/werkzeug#2363).

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@pw-64
Comment options

@pw-64
Comment options

@pw-64
Comment options

@miguelgrinberg
Comment options

Answer selected by pw-64
@pw-64
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants