* 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),
)
| 669 | * tests; the timer passes the real one. |
| 670 | */ |
| 671 | checkInstall( |
| 672 | changed: () => string | null = () => installChangedReason(CodeGraphPackageJsonPath, CodeGraphPackageVersion), |
| 673 | ): boolean { |
| 674 | if (this.stopping) return false; |
| 675 | const reason = changed(); |
| 676 | if (!reason) return false; |
| 677 | process.stderr.write(`[CodeGraph daemon] ${reason}; exiting so the next session starts a daemon from the current install.\n`); |
| 678 | void this.stop('install changed'); |
| 679 | return true; |
| 680 | } |
| 681 | |
| 682 | /** |
| 683 | * Decide whether the inactivity backstop should reap the daemon right now. |
no test coverage detected