* Exit once the install this daemon runs from has been upgraded or removed * (#2335; see installChangedReason). Its clients' proxies fall back * and reconnect, and the next launch starts a daemon from the current * install. Returns whether the daemon is exiting. The check is injecte
(
changed: () => string | null = () => installChangedReason(CodeGraphPackageJsonPath, CodeGraphPackageVersion),
)
| 545 | * tests; the timer passes the real one. |
| 546 | */ |
| 547 | checkInstall( |
| 548 | changed: () => string | null = () => installChangedReason(CodeGraphPackageJsonPath, CodeGraphPackageVersion), |
| 549 | ): boolean { |
| 550 | if (this.stopping) return false; |
| 551 | const reason = changed(); |
| 552 | if (!reason) return false; |
| 553 | process.stderr.write(`[CodeGraph daemon] ${reason}; exiting so the next session starts a daemon from the current install.\n`); |
| 554 | void this.stop('install changed'); |
| 555 | return true; |
| 556 | } |
| 557 | |
| 558 | /** |
| 559 | * Decide whether the inactivity backstop should reap the daemon right now. |
no test coverage detected