Propagate SystemExit exception further

This commit is contained in:
Vasily 2016-01-18 17:11:07 +03:00
parent 03428bcf38
commit 1b9bd39492

@ -212,6 +212,9 @@ class WebSocketApp(object):
self._callback(self.on_message, data)
except (Exception, KeyboardInterrupt, SystemExit) as e:
self._callback(self.on_error, e)
if isinstance(e, SystemExit):
# propagate SystemExit further
raise
finally:
if thread:
event.set()