This commit is contained in:
flaskfarm
2022-10-13 02:02:30 +09:00
parent 5f55743bd2
commit 89bba2e2e1
2 changed files with 15 additions and 6 deletions

View File

@@ -78,7 +78,10 @@ class Framework:
if self.config['use_gevent']:
self.socketio = SocketIO(self.app, cors_allowed_origins="*")
else:
self.socketio = SocketIO(self.app, cors_allowed_origins="*", async_mode='threading')
if self.config['running_type'] == 'termux':
self.socketio = SocketIO(self.app, cors_allowed_origins="*", async_mode='eventlet')
else:
self.socketio = SocketIO(self.app, cors_allowed_origins="*", async_mode='threading')
CORS(self.app)
Markdown(self.app)