Files
Jordi Ibáñez 70e04fc15f fix: avoid false offline results in Electron instance probes (#3415)
* fix: avoid false offline results in Electron instance probes

Use Chromium networking with one abortable deadline per direct-host attempt. Retry unreachable selector probes once while preserving identity, auth and compatibility checks, and clean up response bodies on every exit.

Add regression coverage and document the native probe invariants.

* fix: declare Electron probe's zod dependency

Declare the existing workspace zod version as an Electron runtime dependency so probe imports do not rely on root hoisting. Update only the matching lockfile workspace entry, without changing resolved versions or parsing behavior.
2026-09-09 17:44:38 +03:00

11 lines
342 B
JavaScript

export const FAST_HOST_PROBE_TIMEOUT_MS = 2_000;
export const RETRY_HOST_PROBE_TIMEOUT_MS = 10_000;
export const probeDirectHostWithRetry = async (probe) => {
const fastResult = await probe(FAST_HOST_PROBE_TIMEOUT_MS);
if (fastResult.status !== 'unreachable') {
return fastResult;
}
return probe(RETRY_HOST_PROBE_TIMEOUT_MS);
};