Skip to content

Commit

Permalink
Raise a runtime error when gevent-websocket's custom server is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Oct 7, 2015
1 parent 895e1bd commit e38cad9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions engineio/async_gevent.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ def __init__(self, app):
self.app = app

def __call__(self, environ, start_response):

self._sock = environ["wsgi.websocket"]
if 'wsgi.websocket' not in environ:
raise RuntimeError('You need to use the gevent-websocket server. '
'See the Deployment section of the '
'documentation for more information.')
self._sock = environ['wsgi.websocket']
self.environ = environ
self.version = self._sock.version
self.path = self._sock.path
Expand Down

0 comments on commit e38cad9

Please sign in to comment.