fix(plugin): close kubernetes exec timeout edges

This commit is contained in:
Dotta
2026-05-13 14:10:04 -05:00
committed by Chris Farhood
parent 40e8638aa3
commit 3e998bda97
2 changed files with 40 additions and 1 deletions
@@ -153,7 +153,7 @@ export async function execInPod(
websocketPromise
.then((webSocket) => {
ws = webSocket as WebSocketLike;
if (stdinStream && stdinPayload) {
if (!settled && stdinStream && stdinPayload) {
stdinStream.end(stdinPayload);
}
ws.on("close", (code: number, reason: Buffer) => {
@@ -168,6 +168,7 @@ export async function execInPod(
})
.catch((err) => {
if (settled) return;
if (timeout) clearTimeout(timeout);
reject(err);
});
},