Skip to content

Commit

Permalink
graceful exit for service task
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Oct 7, 2018
1 parent 3846510 commit 2f5cd48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engineio/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,8 @@ def _service_task(self): # pragma: no cover
continue
s.check_ping_timeout()
self.sleep(sleep_interval)
except (SystemExit, KeyboardInterrupt):
break
except:
# an unexpected exception has occurred, log it and continue
self.logger.exception('service task exception')

0 comments on commit 2f5cd48

Please sign in to comment.