def on_connection_close(self): BaseWebSocketHandler.on_connection_close(self) if self.timeoutTimer: tornado.ioloop.IOLoop.current().remove_timeout(self.timeoutTimer) self.timeoutTimer = None if self.pingTimer: tornado.ioloop.IOLoop.current().remove_timeout(self.pingTimer) self.pingTimer = None if self in clients: clients.remove(self)
def __init__(self, application, request, **kwargs): BaseWebSocketHandler.__init__(self, application, request, **kwargs) self.timeoutTimer = None self.pingTimer = None