From: Jérôme Benoit Date: Tue, 15 Aug 2023 17:50:09 +0000 (+0200) Subject: fix: fix ws server example kill handler usage X-Git-Tag: v2.6.27~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=cb5d91cf02e4d7c92c5c8554afd2aa6e3e291af1;p=poolifier.git fix: fix ws server example kill handler usage Signed-off-by: Jérôme Benoit --- diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/src/websocket-server-worker.ts b/examples/typescript/websocket-server-pool/ws-hybrid/src/websocket-server-worker.ts index 0a1cbdfd..90250c04 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/src/websocket-server-worker.ts +++ b/examples/typescript/websocket-server-pool/ws-hybrid/src/websocket-server-worker.ts @@ -94,8 +94,9 @@ ClusterWorkerResponse public constructor () { super(WebSocketServerWorker.startWebSocketServer, { - killHandler: () => { + killHandler: async () => { WebSocketServerWorker.wss.close() + await WebSocketServerWorker.requestHandlerPool.destroy() } }) }