Skip to content

Commit

Permalink
chore: terminate clients on close
Browse files Browse the repository at this point in the history
  • Loading branch information
Marsup committed Jun 29, 2024
1 parent dc010bc commit 6fbd71c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ internals.Listener.prototype._close = async function () {
await Promise.all(Object.keys(this._sockets._items).map((id) => this._sockets._items[id].disconnect()));

this._wss.close();

for (const ws of this._wss.clients) {
ws.terminate();
}
};


Expand Down

0 comments on commit 6fbd71c

Please sign in to comment.