Skip to content

Commit

Permalink
Linux上で外部からKillされたENGINEを再起動できない問題を修正 (#286)
Browse files Browse the repository at this point in the history
* signalCode check on RESTART_ENGINE

* fix log message

* fix format

* fix comment
  • Loading branch information
aoirint authored Oct 1, 2021
1 parent d343bdf commit 4fa6f19
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,14 @@ ipcMainHandle(
`Restarting ENGINE (last exit code: ${engineProcess.exitCode}, signal: ${engineProcess.signalCode})`
);

// エンジンのプロセスが存在しない(すでに終了している)場合
// エンジンのプロセスがすでに終了している、またはkillされている場合
const engineExited = engineProcess.exitCode !== null;
const engineKilled = engineProcess.signalCode !== null;

if (engineExited) {
log.info("ENGINE process is not started yet. Starting ENGINE...");
if (engineExited || engineKilled) {
log.info(
"ENGINE process is not started yet or already killed. Starting ENGINE..."
);

runEngine();
resolve();
Expand Down

0 comments on commit 4fa6f19

Please sign in to comment.