* 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.
11 lines
342 B
JavaScript
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);
|
|
};
|