Skip to content

Commit

Permalink
Remove misleading warning about use of gevent-websocket (Fixes #2122)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Dec 12, 2024
1 parent 6a6734f commit a1d3d61
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/flask_socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a1d3d61

Please sign in to comment.