From 335f6fa42bf67e6a1271fd4bcf2c2eda0b28330a Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 13 Jul 2014 23:42:36 +0200 Subject: [PATCH] Touch session on web socket ping/pong. --- script/websocket-server.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/script/websocket-server.rb b/script/websocket-server.rb index 059c03b3d..9b5bb0ddc 100755 --- a/script/websocket-server.rb +++ b/script/websocket-server.rb @@ -175,6 +175,7 @@ EventMachine.run { # remember ping, send pong back elsif data['action'] == 'ping' + Sessions.touch(client_id) @clients[client_id][:last_ping] = Time.now @clients[client_id][:websocket].send( '[{"action":"pong"}]' )