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"}]' )