From a7a7e5fa3734d7eccf9f47de954dbb19b81fa48d Mon Sep 17 00:00:00 2001 From: librelois <elois@ifee.fr> Date: Tue, 14 Nov 2017 17:03:04 +0100 Subject: [PATCH] [fix) treat the case nbCores <= 0 --- app/modules/prover/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/modules/prover/index.ts b/app/modules/prover/index.ts index 01b4bc719..d4b138265 100644 --- a/app/modules/prover/index.ts +++ b/app/modules/prover/index.ts @@ -23,6 +23,8 @@ export const ProverDependency = { } if (conf.nbCores === null || conf.nbCores === undefined) { conf.nbCores = Math.min(Constants.CORES_MAXIMUM_USE_IN_PARALLEL, require('os').cpus().length) + } else if (conf.nbCores <= 0) { + conf.nbCores = 1 } if (conf.prefix === null || conf.prefix === undefined) { conf.prefix = Constants.DEFAULT_PEER_ID; -- GitLab