Skip to content

Commit

Permalink
fix: ensure setting the config cbs only once
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Sep 29, 2016
1 parent a2ebc1a commit e44a8ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"go-ipfs-dep": "0.4.3",
"ipfs-api": "^9.0.0",
"multiaddr": "^2.0.3",
"once": "^1.4.0",
"rimraf": "^2.5.4",
"run-series": "^1.1.4",
"shutdown": "^0.2.4",
Expand Down
2 changes: 2 additions & 0 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const shutdown = require('shutdown')
const path = require('path')
const join = path.join
const bl = require('bl')
const once = require('once')

const ipfsDefaultPath = findIpfsExecutable()

Expand Down Expand Up @@ -255,6 +256,7 @@ module.exports = class Node {
}

setConfig (key, value, done) {
done = once(done)
run(this.exec, ['config', key, value, '--json'], {env: this.env})
.on('error', done)
.on('data', () => {})
Expand Down

0 comments on commit e44a8ac

Please sign in to comment.