Skip to content

Commit a53f801

Browse files
chore: close stdin before sending sigkill
1 parent 56b6e7d commit a53f801

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/client/stdio.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@ export class StdioClientTransport implements Transport {
225225
await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 1_000).unref())]);
226226

227227
if (processToClose.exitCode === null) {
228+
try {
229+
processToClose.stdin?.end();
230+
} catch {
231+
// ignore errors in trying to close stdin
232+
}
233+
228234
try {
229235
processToClose.kill('SIGKILL');
230236
} catch {

0 commit comments

Comments
 (0)