Retry transient terminal DNS lookups (#1011)

* Retry transient terminal DNS lookups

* Apply DNS retry to SSH entry points
This commit is contained in:
ZacharyZcR
2026-07-10 08:03:19 +08:00
committed by GitHub
parent 6b98b86969
commit 4f05bd4fbd
9 changed files with 270 additions and 4 deletions
+9
View File
@@ -14,6 +14,7 @@ import {
getContainerRuntimeConfig,
type ContainerRuntime,
} from "./container-runtime.js";
import { resolveSshConnectConfigHost } from "./ssh-dns.js";
const sshLogger = systemLogger;
@@ -276,6 +277,10 @@ async function createJumpHostChain(
});
}
if (!config.sock) {
await resolveSshConnectConfigHost(config);
}
await new Promise<void>((resolve, reject) => {
client.on("ready", () => resolve());
client.on("error", reject);
@@ -489,6 +494,10 @@ wss.on("connection", async (ws: WebSocket, req) => {
}
}
if (!config.sock) {
await resolveSshConnectConfigHost(config);
}
await new Promise<void>((resolve, reject) => {
client.on("ready", () => resolve());
client.on("error", reject);