perf: switch benchmarks to factorial(50000)
[poolifier.git] / examples / typescript / websocket-server-pool / ws-hybrid / src / websocket-server-worker.ts
index eabf72ebb30449aaec103e485d8d1105d3bca333..e52f0c06c9331ee011b17b75c8724974c8329a3b 100644 (file)
@@ -78,10 +78,13 @@ ClusterWorkerResponse
               .execute({ data }, 'factorial')
               .then(response => {
                 ws.send(
-                  JSON.stringify({
-                    type: MessageType.factorial,
-                    data: response.data
-                  })
+                  JSON.stringify(
+                    {
+                      type: MessageType.factorial,
+                      data: response.data
+                    },
+                    (_, v) => (typeof v === 'bigint' ? v.toString() : v)
+                  )
                 )
                 return undefined
               })