Handle more built-in exceptions that are not derived from Exception in WebSocketApp.run_forever()

This commit is contained in:
Vasily 2016-01-15 16:58:40 +03:00
parent b614606b35
commit 03428bcf38
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ class WebSocketApp(object):
data = data.decode("utf-8")
self._callback(self.on_data, data, frame.opcode, True)
self._callback(self.on_message, data)
except Exception as e:
except (Exception, KeyboardInterrupt, SystemExit) as e:
self._callback(self.on_error, e)
finally:
if thread: