Merge pull request #172 from ZoomerAnalytics/fix-keepalive-ping

added missing keepalive_timer.start()
This commit is contained in:
Mounier Florian
2018-09-03 11:27:55 +02:00
committed by GitHub

View File

@@ -139,6 +139,7 @@ class KeptAliveWebSocketHandler(tornado.websocket.WebSocketHandler):
def open(self, *args, **kwargs):
self.keepalive_timer = tornado.ioloop.PeriodicCallback(
self.send_ping, tornado.options.options.keepalive_interval * 1000)
self.keepalive_timer.start()
def send_ping(self):
t = int(time.time())