Skip to content

Commit 6fbd71c

Browse files
committed
chore: terminate clients on close
1 parent dc010bc commit 6fbd71c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/listener.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ internals.Listener.prototype._close = async function () {
104104
await Promise.all(Object.keys(this._sockets._items).map((id) => this._sockets._items[id].disconnect()));
105105

106106
this._wss.close();
107+
108+
for (const ws of this._wss.clients) {
109+
ws.terminate();
110+
}
107111
};
108112

109113

0 commit comments

Comments
 (0)