aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cdp/discovery.ts6
1 files changed, 5 insertions, 1 deletions
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<Result<CdpEndpoint, CdpError>>
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