diff --git a/src/kubo/daemon.ts b/src/kubo/daemon.ts index a2b39197..5332ceea 100644 --- a/src/kubo/daemon.ts +++ b/src/kubo/daemon.ts @@ -241,13 +241,9 @@ export default class KuboDaemon implements KuboNode { return } - if (!(await this.api.isOnline())) { - return - } - - await this.api.stop() - try { + await this.api.stop() + // wait for the subprocess to exit and declare ourselves stopped await waitFor(() => subprocess.exitCode != null, { timeout