Skip to content

Commit a3a8aa5

Browse files
committed
[ws] Exhaustive server clean up
1 parent db121d5 commit a3a8aa5

File tree

1 file changed

+3
-1
lines changed
  • src/synchronizers/synchronizer-ws-server

1 file changed

+3
-1
lines changed

src/synchronizers/synchronizer-ws-server/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {arrayForEach, arrayPush} from '../../common/array.ts';
2727
import {
2828
collClear,
2929
collDel,
30+
collForEach,
3031
collIsEmpty,
3132
collSize,
3233
collSize2,
@@ -237,8 +238,9 @@ export const createWsServer = (<
237238
});
238239

239240
const destroy = () => {
240-
webSocketServer.close();
241241
collClear(clientsByPath);
242+
collForEach(serverClientsByPath, stopServerClient);
243+
webSocketServer.close();
242244
};
243245

244246
const wsServer = {

0 commit comments

Comments
 (0)