Update app.py

This commit is contained in:
Saifeddine ALOUI 2024-01-19 14:34:44 +01:00 committed by GitHub
parent 2648461e44
commit d3c9e45c25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

5
app.py
View File

@ -25,7 +25,8 @@ import threading
app = FastAPI()
# Create a Socket.IO server
sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins="*") # Enable CORS for all origins
sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins="*", ping_timeout=1200, ping_interval=30) # Enable CORS for all origins
@sio.event
@ -188,4 +189,4 @@ if __name__ == "__main__":
trace_exception(ex)