mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-26 12:12:31 +01:00
Fix scripts/benchmark/connections.js
This commit is contained in:
parent
4ca5a4d0b7
commit
186f28516c
@ -8,7 +8,7 @@ var cores = 1;
|
|||||||
try {
|
try {
|
||||||
cores = Number(process.env.THREADS) || os.cpus().length;
|
cores = Number(process.env.THREADS) || os.cpus().length;
|
||||||
} catch {
|
} catch {
|
||||||
console.log("[Bundle] Failed to get thread count! Using 1...")
|
console.log("[Bundle] Failed to get thread count! Using 1...");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!token) {
|
if (!token) {
|
||||||
@ -17,7 +17,7 @@ if (!token) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cluster.isMaster) {
|
if (cluster.isMaster) {
|
||||||
for (let i = 0; i < threads; i++) {
|
for (let i = 0; i < cores; i++) {
|
||||||
cluster.fork();
|
cluster.fork();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user