diff --git a/src/commands/killInternalProcess.js b/src/commands/killInternalProcess.js index 428fecd4..33ad0102 100644 --- a/src/commands/killInternalProcess.js +++ b/src/commands/killInternalProcess.js @@ -1,10 +1,10 @@ // @flow import { createCommand, Command } from 'helpers/ipc' -import { of } from 'rxjs' +import { never } from 'rxjs' type Input = void -type Result = boolean +type Result = void const cmd: Command = createCommand('killInternalProcess', () => { setTimeout(() => { @@ -12,7 +12,8 @@ const cmd: Command = createCommand('killInternalProcess', () => { // special exit code for better identification process.exit(42) }) - return of(true) + // The command shouldn't finish now because process.exit will make it end! + return never() }) export default cmd diff --git a/src/helpers/reset.js b/src/helpers/reset.js index d0ead9ca..7a8e51ac 100644 --- a/src/helpers/reset.js +++ b/src/helpers/reset.js @@ -10,7 +10,10 @@ import libcoreReset from 'commands/libcoreReset' async function resetLibcore() { // we need to stop everything that is happening right now, like syncs - await killInternalProcess.send().toPromise() + await killInternalProcess + .send() + .toPromise() + .catch(() => {}) // this is a normal error due to the crash of the process, we ignore it // we can now ask libcore to reset itself await libcoreReset.send().toPromise() }