mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-07-01 05:59:37 +00:00
- Add global shutdown state tracking via shutdown-state.ts module - Update refresh-sessions endpoint to return 503 during shutdown - Skip HQ notifications in control-dir-watcher during shutdown - Disable remote health checks during server shutdown - Suppress expected connection errors when servers are shutting down This prevents the flood of "Failed to refresh sessions" and "Failed to notify HQ" errors that were appearing in the HQ e2e test logs when servers were shutting down. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
15 lines
370 B
TypeScript
15 lines
370 B
TypeScript
/**
|
|
* Global shutdown state management for the server.
|
|
* This module tracks whether the server is currently shutting down
|
|
* to allow various components to handle shutdown gracefully.
|
|
*/
|
|
|
|
let shuttingDown = false;
|
|
|
|
export function isShuttingDown(): boolean {
|
|
return shuttingDown;
|
|
}
|
|
|
|
export function setShuttingDown(value: boolean): void {
|
|
shuttingDown = value;
|
|
}
|