Handle more built-in exceptions that are not derived from Exception in WebSocketApp.run_forever()
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user