refactor: disable pool event emitter for in cluster pool examples
[poolifier.git] / examples / typescript / websocket-server-pool / ws-hybrid / src / main.ts
index 3adac7e819b3c6a35fd5fbd6f40196ea1df2846b..177d7d3b5813f04ff10dd8812f8eafeec1099407 100644 (file)
@@ -17,6 +17,7 @@ const pool = new FixedClusterPool<ClusterWorkerData, ClusterWorkerResponse>(
   Math.round(availableParallelism() / 2),
   webSocketServerWorkerFile,
   {
+    enableEvents: false,
     onlineHandler: () => {
       pool
         .execute({
@@ -41,7 +42,7 @@ const pool = new FixedClusterPool<ClusterWorkerData, ClusterWorkerResponse>(
               `WebSocket server is listening in cluster worker on port ${response.port}`
             )
           }
-          return null
+          return undefined
         })
         .catch(error => {
           console.error(