| ... | @@ -80,12 +80,13 @@ function startApp() { | ... | @@ -80,12 +80,13 @@ function startApp() { |
| 80 | } | 80 | } |
| 81 | }); | 81 | }); |
| 82 | | 82 | |
| 83 | app.once("exit", () => { | 83 | app.once("exit", (code, signal) => { |
| 84 | if (currentApp === app) { | 84 | if (currentApp === app) { |
| 85 | currentApp = null; | 85 | currentApp = null; |
| 86 | } | 86 | } |
| 87 | | 87 | |
| 88 | if (!shuttingDown && !expectedExits.has(app)) { | 88 | const exitedAbnormally = signal !== null || code !== 0; |
| | 89 | if (!shuttingDown && !expectedExits.has(app) && exitedAbnormally) { |
| 89 | scheduleRestart(); | 90 | scheduleRestart(); |
| 90 | } | 91 | } |
| 91 | }); | 92 | }); |