sync: update from private repo (7d64ee2)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-06-05 05:42:11 +00:00
parent c526adddc2
commit 02c7dfdd83
16 changed files with 205 additions and 35 deletions
+7 -2
View File
@@ -246,6 +246,7 @@ async function ensureSessionInternal(
// Open the channel. On failure clear the PEM and bail.
let channel: import('ssh2').ClientChannel;
let client: import('ssh2').Client;
let hostFingerprint: string;
try {
const shellResult = await sub.openShellChannel({
@@ -266,6 +267,7 @@ async function ensureSessionInternal(
timeoutMs: sub.config.callTimeoutSeconds * 1000,
});
channel = shellResult.channel;
client = shellResult.client;
hostFingerprint = shellResult.hostFingerprint;
} catch (e) {
clearBuffer(pemBuf);
@@ -292,8 +294,10 @@ async function ensureSessionInternal(
return err(`SshConsoleEnsure: failed to open shell channel: ${(e as Error).message}`);
}
// Build the session and register it. From here on the channel + PEM
// belong to the session; we don't clear them on the happy path.
// Build the session and register it. From here on the channel + client
// + PEM belong to the session; we don't clear them on the happy path.
// The session ends the client (and thus releases the PEM-bound
// connection) when it closes.
const session = new ConsoleSession({
localTaskId,
connectionId,
@@ -303,6 +307,7 @@ async function ensureSessionInternal(
rows,
scrollbackCap: sub.config.console.scrollbackBytes,
channel,
client,
auditRepo: sub.auditRepo,
});
sub.sessionRegistry.register(session);