From a2e4a97ad94a5d27880fdfd011edae8d57392af8 Mon Sep 17 00:00:00 2001 From: OneStepAt4time Date: Sat, 11 Apr 2026 00:40:37 +0200 Subject: [PATCH] fix(client): increase health check tolerance to 10s to prevent flapping --- src/cdp/client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cdp/client.ts b/src/cdp/client.ts index 20d0f50..a10069a 100644 --- a/src/cdp/client.ts +++ b/src/cdp/client.ts @@ -239,11 +239,12 @@ export class CDPClient { const result = await Promise.race([ this.evaluate('1+1'), new Promise((_, reject) => - setTimeout(() => reject(new Error('health check timeout')), 3000), + setTimeout(() => reject(new Error('health check timeout')), 10000), ), ]) return result.result?.value === 2 - } catch { + } catch (err) { + this.logger.debug(`Health check failed: ${err instanceof Error ? err.message : String(err)}`) this.state.connected = false return false }