MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / waitSshDown

Function waitSshDown

e2e/src/vm/ec2.ts:309–315  ·  view source on GitHub ↗
(attempts = 40)

Source from the content-addressed store, hash-verified

307 };
308
309 const waitSshDown = async (attempts = 40): Promise<void> => {
310 for (let i = 0; i < attempts; i++) {
311 if ((await ssh("echo up").catch(() => ({ code: 1 }) as SshResult)).code !== 0) return;
312 await sleep(3000);
313 }
314 // never observed down — caller's boot-time check is the backstop.
315 };
316
317 const bootTime = async (): Promise<string> =>
318 os === "windows"

Callers 1

ec2VmFunction · 0.85

Calls 2

sleepFunction · 0.90
sshFunction · 0.70

Tested by

no test coverage detected