X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fwebsocket-server-pool%2Fws-worker_threads%2Fsrc%2Fmain.ts;h=f3aea4e5b60a2cdc15fa2f3a124ed93673b39b53;hb=b3543488a1e708d0f39122ea01434ef620044a41;hp=6283759d403047be2837b8322147f0741973adcd;hpb=72855e9267a3268aa40be64f4cde6287e7c1c52e;p=poolifier.git diff --git a/examples/typescript/websocket-server-pool/ws-worker_threads/src/main.ts b/examples/typescript/websocket-server-pool/ws-worker_threads/src/main.ts index 6283759d..f3aea4e5 100644 --- a/examples/typescript/websocket-server-pool/ws-worker_threads/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-worker_threads/src/main.ts @@ -1,6 +1,7 @@ import { type RawData, WebSocketServer } from 'ws' -import { type DataPayload, type MessagePayload, MessageType } from './types.js' + import { requestHandlerPool } from './pool.js' +import { type DataPayload, type MessagePayload, MessageType } from './types.js' const port = 8080 const wss = new WebSocketServer({ port }, () => { @@ -10,7 +11,7 @@ const wss = new WebSocketServer({ port }, () => { }) const emptyFunction = (): void => { - /** Intentional */ + /* Intentional */ } wss.on('connection', ws => { @@ -31,7 +32,7 @@ wss.on('connection', ws => { data: response.data }) ) - return null + return undefined }) .catch(emptyFunction) break @@ -45,7 +46,7 @@ wss.on('connection', ws => { data: response.data }) ) - return null + return undefined }) .catch(emptyFunction) break