From fff53125dd896538a5f7766348d19d7d4bbf0a38 Mon Sep 17 00:00:00 2001 From: Kyle Mahan Date: Tue, 24 Feb 2015 22:47:08 -0800 Subject: [PATCH] oops remove subscribers when they disconnect --- woodwind/websocket_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woodwind/websocket_server.py b/woodwind/websocket_server.py index e670186..555878b 100644 --- a/woodwind/websocket_server.py +++ b/woodwind/websocket_server.py @@ -39,7 +39,7 @@ class WSHandler(tornado.websocket.WebSocketHandler): def on_close(self): if hasattr(self, 'topic'): - SUBSCRIBERS.setdefault(self.topic, []).append(self) + SUBSCRIBERS.get(self.topic, []).remove(self) application = tornado.web.Application([