Skip to content

Commit b37ebcc

Browse files
author
Alan Shaw
authored
chore: do not call shutdown twice
The interface tests in ipfs-inactive/js-ipfs-http-client#1183 have started throwing `UnhandledPromiseRejection`s for a connection refused error to `/api/v0/shutdown`. This is because `stop` was being called and then called again in `killProcess`. With callbacks this error was smothered but it is now appearing with the promise-only API.
1 parent 096baa4 commit b37ebcc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ipfsd-daemon.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ class Daemon {
251251
if (!this.subprocess) {
252252
return this
253253
}
254-
await this.api.stop()
255-
// TODO this should call this.api.stop
254+
256255
await this.killProcess(timeout)
257256

258257
if (this.disposable) {

0 commit comments

Comments
 (0)