From c57d1ebe06775b6c5ceed2282c1cbe05fa2687e0 Mon Sep 17 00:00:00 2001 From: Nikhil Sonti Date: Thu, 26 Feb 2026 19:21:57 -0800 Subject: [PATCH] fix: remove health check remove --- apps/server/src/api/routes/health.ts | 20 -------------------- bun.lock | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/apps/server/src/api/routes/health.ts b/apps/server/src/api/routes/health.ts index 736a821a..dee29ed2 100644 --- a/apps/server/src/api/routes/health.ts +++ b/apps/server/src/api/routes/health.ts @@ -4,35 +4,15 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -import { EXIT_CODES } from '@browseros/shared/constants/exit-codes' import { Hono } from 'hono' import type { Browser } from '../../browser/browser' -import { logger } from '../../lib/logger' - -const HEALTH_CHECK_TIMEOUT = 5 * 60 * 1000 // 5 minutes interface HealthDeps { browser?: Browser } export function createHealthRoute(deps: HealthDeps = {}) { - let watchdogTimer: ReturnType | null = null - - function resetWatchdog() { - if (watchdogTimer) clearTimeout(watchdogTimer) - watchdogTimer = setTimeout(() => { - logger.error( - 'No health check received in 5 minutes, Chromium may be gone — exiting', - ) - process.exit(EXIT_CODES.GENERAL_ERROR) - }, HEALTH_CHECK_TIMEOUT) - } - - // Start the watchdog on creation - resetWatchdog() - return new Hono().get('/', (c) => { - resetWatchdog() const cdpConnected = deps.browser?.isCdpConnected() ?? true return c.json({ status: 'ok', cdpConnected }) }) diff --git a/bun.lock b/bun.lock index c84bae86..f36f54ae 100644 --- a/bun.lock +++ b/bun.lock @@ -139,7 +139,7 @@ }, "apps/server": { "name": "@browseros/server", - "version": "0.0.60", + "version": "0.0.61", "bin": { "browseros-server": "./src/index.ts", },