Spaces:
Runtime error
Runtime error
Upload main.py
Browse files
backend/rexpro_ai/socket/main.py
CHANGED
|
@@ -68,7 +68,7 @@ if WEBSOCKET_MANAGER == 'redis':
|
|
| 68 |
sio = socketio.AsyncServer(
|
| 69 |
cors_allowed_origins=SOCKETIO_CORS_ORIGINS,
|
| 70 |
async_mode='asgi',
|
| 71 |
-
transports=(['websocket'] if ENABLE_WEBSOCKET_SUPPORT else ['polling']),
|
| 72 |
allow_upgrades=ENABLE_WEBSOCKET_SUPPORT,
|
| 73 |
always_connect=True,
|
| 74 |
client_manager=redis_manager,
|
|
@@ -81,7 +81,7 @@ else:
|
|
| 81 |
sio = socketio.AsyncServer(
|
| 82 |
cors_allowed_origins=SOCKETIO_CORS_ORIGINS,
|
| 83 |
async_mode='asgi',
|
| 84 |
-
transports=(['websocket'] if ENABLE_WEBSOCKET_SUPPORT else ['polling']),
|
| 85 |
allow_upgrades=ENABLE_WEBSOCKET_SUPPORT,
|
| 86 |
always_connect=True,
|
| 87 |
logger=WEBSOCKET_SERVER_LOGGING,
|
|
|
|
| 68 |
sio = socketio.AsyncServer(
|
| 69 |
cors_allowed_origins=SOCKETIO_CORS_ORIGINS,
|
| 70 |
async_mode='asgi',
|
| 71 |
+
transports=(['polling', 'websocket'] if ENABLE_WEBSOCKET_SUPPORT else ['polling']),
|
| 72 |
allow_upgrades=ENABLE_WEBSOCKET_SUPPORT,
|
| 73 |
always_connect=True,
|
| 74 |
client_manager=redis_manager,
|
|
|
|
| 81 |
sio = socketio.AsyncServer(
|
| 82 |
cors_allowed_origins=SOCKETIO_CORS_ORIGINS,
|
| 83 |
async_mode='asgi',
|
| 84 |
+
transports=(['polling', 'websocket'] if ENABLE_WEBSOCKET_SUPPORT else ['polling']),
|
| 85 |
allow_upgrades=ENABLE_WEBSOCKET_SUPPORT,
|
| 86 |
always_connect=True,
|
| 87 |
logger=WEBSOCKET_SERVER_LOGGING,
|