Handle more built-in exceptions that are not derived from Exception in WebSocketApp.run_forever()
This commit is contained in:
parent
b614606b35
commit
03428bcf38
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue