From: Joseph Coffland Date: Tue, 18 Dec 2018 00:27:06 +0000 (-0800) Subject: Ignore errors from disconnected web socket X-Git-Url: https://git.buildbotics.com/?a=commitdiff_plain;h=5be507ef0c69ec656465cf351b0003c157ca95bf;p=bbctrl-firmware Ignore errors from disconnected web socket --- 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):