From a1d3d61265fd45331ffd1957defa2f767e9c0115 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Thu, 12 Dec 2024 18:45:26 +0000 Subject: [PATCH] Remove misleading warning about use of gevent-websocket (Fixes #2122) --- src/flask_socketio/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/flask_socketio/__init__.py b/src/flask_socketio/__init__.py index 9d5dcad..7129060 100644 --- a/src/flask_socketio/__init__.py +++ b/src/flask_socketio/__init__.py @@ -695,17 +695,15 @@ def run_server(): from gevent import pywsgi try: from geventwebsocket.handler import WebSocketHandler - websocket = True + gevent_websocket = True except ImportError: - app.logger.warning( - 'WebSocket transport not available. Install ' - 'gevent-websocket for improved performance.') - websocket = False + # WebSocket support will come from the simple-websocket package + gevent_websocket = False log = 'default' if not log_output: log = None - if websocket: + if gevent_websocket: self.wsgi_server = pywsgi.WSGIServer( (host, port), app, handler_class=WebSocketHandler, log=log, **kwargs)