Reviewed-on: sh-edraft.de/kd_discord_bot#291 Reviewed-by: Ebola-Chan <nick.jungmann@gmail.com> Closes #290
This commit is contained in:
commit
c71b1092f2
@ -53,7 +53,10 @@ class Api(Flask):
|
|||||||
self.register_error_handler(exc_class, self.handle_exception)
|
self.register_error_handler(exc_class, self.handle_exception)
|
||||||
|
|
||||||
# websockets
|
# websockets
|
||||||
self._socketio = SocketIO(self, cors_allowed_origins="*", path="/api/socket.io")
|
# 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")
|
||||||
self._socketio.on_event("connect", self.on_connect)
|
self._socketio.on_event("connect", self.on_connect)
|
||||||
self._socketio.on_event("disconnect", self.on_disconnect)
|
self._socketio.on_event("disconnect", self.on_disconnect)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user