-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Immediately remove closed websocket clients from weakset
When a client closes the connection, immediately remove the WebSocket instance from the instances list, rather than waiting for the heartbeat to time the connection out and garbage collect it. This is a small optimisation to ensure that the stats on number of connected clients are as accurate as possible, and that we don't waste CPU time iterating over sockets that are terminated.
- Loading branch information
1 parent
64e720e
commit a3d21d4
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters