Skip to content

Commit

Permalink
handle unexpected disconnects from uwsgi websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Feb 27, 2017
1 parent fcf7eca commit 10ebccf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion engineio/async_gevent_uwsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def select_greenlet_runner(fd, event):
"""Sets event when data becomes available to read on fd."""
while True:
event.set()
select([fd], [], [])[0]
try:
select([fd], [], [])[0]
except ValueError:
break
self._select_greenlet = gevent.spawn(
select_greenlet_runner,
uwsgi.connection_fd(),
Expand Down

0 comments on commit 10ebccf

Please sign in to comment.