From a9d180fdf1443ada2b20282115cedfeadfc72606 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 3 Apr 2023 07:53:24 +0200 Subject: [PATCH] Fixed last api changes --- kdb-bot/src/bot_api/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kdb-bot/src/bot_api/api.py b/kdb-bot/src/bot_api/api.py index 01211837..64c060e9 100644 --- a/kdb-bot/src/bot_api/api.py +++ b/kdb-bot/src/bot_api/api.py @@ -54,9 +54,9 @@ class Api(Flask): # websockets # Added async_mode see link below - # https://stackoverflow.com/questions/39370848/flask-socket-io-sometimes-client-calls-freeze-the-server # https://github.com/miguelgrinberg/Flask-SocketIO/discussions/1849 - self._socketio = SocketIO(self, cors_allowed_origins="*", path="/api/socket.io", async_mode="threading") + # https://stackoverflow.com/questions/39370848/flask-socket-io-sometimes-client-calls-freeze-the-server + self._socketio = SocketIO(self, cors_allowed_origins="*", path="/api/socket.io", async_mode="eventlet") self._socketio.on_event("connect", self.on_connect) self._socketio.on_event("disconnect", self.on_disconnect)