oops remove subscribers when they disconnect

This commit is contained in:
Kyle Mahan 2015-02-24 22:47:08 -08:00
parent 6efa7f8d1d
commit fff53125dd

View file

@ -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([