Skip to content
Snippets Groups Projects
Unverified Commit a7a7e5fa authored by Éloïs's avatar Éloïs
Browse files

[fix) treat the case nbCores <= 0

parent 1fa1ae6d
No related branches found
No related tags found
2 merge requests!1220Stable/ws2p v1.1 trymerge,!1208Stable/ws2p v1.1
...@@ -23,6 +23,8 @@ export const ProverDependency = { ...@@ -23,6 +23,8 @@ export const ProverDependency = {
} }
if (conf.nbCores === null || conf.nbCores === undefined) { if (conf.nbCores === null || conf.nbCores === undefined) {
conf.nbCores = Math.min(Constants.CORES_MAXIMUM_USE_IN_PARALLEL, require('os').cpus().length) 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) { if (conf.prefix === null || conf.prefix === undefined) {
conf.prefix = Constants.DEFAULT_PEER_ID; conf.prefix = Constants.DEFAULT_PEER_ID;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment