Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/server/websocket.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ exports.attach = (server, createAgent, options) ->
if !!options.trackStats
setInterval ->
options.trackStats
activeWebsocketConnections: wss.clients.length
activeWebsocketConnections: wss.clients.size
, STATISTICS_INTERVAL

# Clients send out a heartbeat at 10 second intervals, if
Expand All @@ -61,7 +61,7 @@ exports.attach = (server, createAgent, options) ->
# event, the client would have already established a new connection by the time
# the server terminates it from it's side.
setInterval ->
for client in wss.clients
wss.clients.forEach (client) ->
client.terminate() if !client.isAlive
client.isAlive = false
, CLIENT_TIMEOUT
Loading