Flask debug mode when using sockets Flask debug mode when using sockets flask flask

Flask debug mode when using sockets


My guess is that the problem is that you haven't monkey patched the standard library, so all these calls you are making to support the monitoring of the asynchronous process are blocking. In debug mode Flask-SocketIO does the monkey patching because the Flask reloader does not work without it.

To monkey patch, just add the following at the very top of your main Python script:

from gevent import monkeymonkey.patch_all()