Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Bugfix/openprocess #121

Merged
merged 5 commits into from
May 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class RPC {
start(configPath, callback, unsafeFlag=false) {
let config = null;

if (this.shares.size + 1 >= cpus().length && !unsafeFlag) {
return callback(new Error('insufficient system resources available'));
if (this.shares.size >= cpus().length && !unsafeFlag) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a single core system this will still throw an error
1 farmer >= 1 core
it should be
1 farmer > 1 core

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so; this is in the start function so, by the end, it's modifying the state from 0 shares to +1 shares. Comparison is 0 farmers >= 1 core, unless I'm chasing my state management tail somewhere here.

return callback(new Error('Insufficient system resources available'));
}

try {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "storjshare-daemon",
"version": "2.5.2",
"version": "2.5.3",
"description": "daemon + process manager for sharing space on the storj network",
"main": "index.js",
"bin": {
Expand Down