diff --git a/app/main.py b/app/main.py index f4e95cd..6531274 100644 --- a/app/main.py +++ b/app/main.py @@ -46,7 +46,9 @@ def create_app(): app.register_blueprint(api_bp) # Initialize SocketIO with the app - socketio.init_app(app, cors_allowed_origins="*", async_mode='gevent') + # Using 'threading' mode for better compatibility with regular HTTP requests + # (gevent mode requires monkey-patching and slows down non-WebSocket requests) + socketio.init_app(app, cors_allowed_origins="*", async_mode='threading') # Initialize archive scheduler if enabled if config.MC_ARCHIVE_ENABLED: diff --git a/requirements.txt b/requirements.txt index 54deac8..6222dbc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,9 +23,7 @@ Pillow==10.1.0 # HTTP Client for MeshCore Bridge communication requests==2.31.0 -# WebSocket support for console +# WebSocket support for console (threading mode - no gevent needed) flask-socketio==5.3.6 python-socketio==5.10.0 python-engineio==4.8.1 -gevent==23.9.1 -gevent-websocket==0.10.1