Improved comments.
This commit is contained in:
parent
71d8af7a52
commit
f38149e823
1 changed files with 4 additions and 4 deletions
|
@ -295,7 +295,7 @@ EventMachine.run {
|
|||
|
||||
idle_time_in_min = 4
|
||||
|
||||
# web sockets
|
||||
# close unused web socket sessions
|
||||
@clients.each { |client_id, client|
|
||||
if ( client[:last_ping] + ( 60 * idle_time_in_min ) ) < Time.now
|
||||
log 'notice', "closing idle websocket connection", client_id
|
||||
|
@ -312,10 +312,10 @@ EventMachine.run {
|
|||
end
|
||||
}
|
||||
|
||||
# close unused sessions
|
||||
# close unused ajax long polling sessions
|
||||
clients = Sessions.destory_idle_sessions(idle_time_in_min)
|
||||
clients.each { |client_id|
|
||||
log 'notice', "closing idle connection", client_id
|
||||
log 'notice', "closing idle long polling connection", client_id
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -327,4 +327,4 @@ EventMachine.run {
|
|||
# puts "#{Time.now}:#{ level }:client(#{ client_id }) #{ data }"
|
||||
end
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue