Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change CI target for next #327

Merged
merged 9 commits into from
Aug 28, 2024
Prev Previous commit
Next Next commit
chore: terminate clients on close
  • Loading branch information
Marsup committed Jun 29, 2024
commit 6fbd71c19f1e7a6969e9fa29638b497941b1d5a3
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