From 5be507ef0c69ec656465cf351b0003c157ca95bf Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Mon, 17 Dec 2018 16:27:06 -0800 Subject: [PATCH] Ignore errors from disconnected web socket --- src/py/bbctrl/Web.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/py/bbctrl/Web.py b/src/py/bbctrl/Web.py index ee24ea0..0fc1fb3 100644 --- a/src/py/bbctrl/Web.py +++ b/src/py/bbctrl/Web.py @@ -439,7 +439,11 @@ class SockJSConnection(ClientConnection, sockjs.tornado.SockJSConnection): sockjs.tornado.SockJSConnection.__init__(self, session) - def send(self, msg): sockjs.tornado.SockJSConnection.send(self, msg) + def send(self, msg): + try: + sockjs.tornado.SockJSConnection.send(self, msg) + except: + self.close() class StaticFileHandler(tornado.web.StaticFileHandler): -- 2.27.0