Skip to content

Commit 0b6493e

Browse files
committed
Fix inactive client reaping
wss.clients is a Set rather than an Array after ws 2.x websockets/ws#934
1 parent 958ea58 commit 0b6493e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/websocket.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ exports.attach = (server, createAgent, options) ->
6161
# event, the client would have already established a new connection by the time
6262
# the server terminates it from it's side.
6363
setInterval ->
64-
for client in wss.clients
64+
wss.clients.forEach (client) ->
6565
client.terminate() if !client.isAlive
6666
client.isAlive = false
6767
, CLIENT_TIMEOUT

0 commit comments

Comments
 (0)