From 08c0c3a8b4fe755f7fe65ea8d258d77971503882 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Thu, 15 Oct 2026 22:25:41 +0100 Subject: fix(cdp): give the castle default 1.5s, not 5s, inside upstream's connect budget --- src/cdp/discovery.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cdp/discovery.ts b/src/cdp/discovery.ts index 84da5f9..7aa35f6 100644 --- a/src/cdp/discovery.ts +++ b/src/cdp/discovery.ts @@ -133,7 +133,11 @@ export const discoverEndpoint = async (): Promise> return err(cdpError("discovery_failed", describeCdpTarget(target))); } if (target.kind === "remote") { - const ws = await queryLiveWsUrl(target.port, 5_000, target.host); + // FORK: the default is only a preference, and this probe now runs inside the + // bridge's 10s connect budget (upstream starts that timer before discovery), so + // a blackholed castle must not eat the local fallback's time. Explicit targets + // keep the longer wait: they fail hard rather than fall back. + const ws = await queryLiveWsUrl(target.port, target.source === "default" ? 1_500 : 5_000, target.host); if (ws) return ok({ wsUrl: ws }); // An explicitly configured endpoint is an instruction: fail rather than -- cgit v1.2.3