Propagate SystemExit exception further

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

View File

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