Skip to content

Commit

Permalink
suppress web server warning when in write-only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Feb 12, 2019
1 parent e9b18b1 commit ca58261
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions flask_socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ def loads(*args, **kwargs):
resource = resource[1:]
if os.environ.get('FLASK_RUN_FROM_CLI'):
if self.server_options.get('async_mode') is None:
app.logger.warning(
'Flask-SocketIO is Running under Werkzeug, WebSocket is '
'not available.')
if app is not None:
app.logger.warning(
'Flask-SocketIO is Running under Werkzeug, WebSocket '
'is not available.')
self.server_options['async_mode'] = 'threading'
self.server = socketio.Server(**self.server_options)
self.async_mode = self.server.async_mode
Expand Down

0 comments on commit ca58261

Please sign in to comment.