Touch session on web socket ping/pong.
This commit is contained in:
parent
014ff4bda2
commit
335f6fa42b
1 changed files with 1 additions and 0 deletions
|
@ -175,6 +175,7 @@ EventMachine.run {
|
||||||
|
|
||||||
# remember ping, send pong back
|
# remember ping, send pong back
|
||||||
elsif data['action'] == 'ping'
|
elsif data['action'] == 'ping'
|
||||||
|
Sessions.touch(client_id)
|
||||||
@clients[client_id][:last_ping] = Time.now
|
@clients[client_id][:last_ping] = Time.now
|
||||||
@clients[client_id][:websocket].send( '[{"action":"pong"}]' )
|
@clients[client_id][:websocket].send( '[{"action":"pong"}]' )
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue