Skip to content

Commit f693cd0

Browse files
committed
fix: review changes
1 parent 82abc2d commit f693cd0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ipfsd-in-proc.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class InProc {
2727
this.initialized = false
2828
this.started = false
2929
this.clean = true
30-
this.exec = null
3130
this.api = null
3231
this.apiAddr = null
3332
this.gatewayAddr = null
@@ -66,7 +65,7 @@ class InProc {
6665
return setImmediate(() => cb(null, this))
6766
}
6867
const IPFS = this.opts.exec
69-
this.api = this.exec = new IPFS({
68+
this.api = new IPFS({
7069
repo: this.path,
7170
init: false,
7271
start: false,
@@ -75,8 +74,8 @@ class InProc {
7574
libp2p: this.opts.libp2p,
7675
config: this.opts.config
7776
})
78-
this.exec.once('error', cb)
79-
this.exec.once('ready', () => cb(null, this))
77+
this.api.once('error', cb)
78+
this.api.once('ready', () => cb(null, this))
8079
}
8180

8281
setApi (addr) {

test/non-disposable.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ tests.forEach((fOpts) => {
192192
return done(err)
193193
}
194194

195+
expect(ipfsd.initialized).to.be.false()
195196
ipfsd.init((err) => {
196197
expect(err).to.not.exist()
197198
expect(ipfsd.initialized).to.be.true()

0 commit comments

Comments
 (0)