From 62b468bf1a046369da091174f9e119af7d887e5a Mon Sep 17 00:00:00 2001 From: fancy45daddy <124528204+fancy45daddy@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:10:28 -0700 Subject: [PATCH] Update sshConnection.ts --- src/sshConnection.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sshConnection.ts b/src/sshConnection.ts index afbd9c8..fad74f5 100644 --- a/src/sshConnection.ts +++ b/src/sshConnection.ts @@ -324,6 +324,7 @@ export default class SSHConnection extends EventEmitter { } const clientSocket = accept(true); if (clientSocket) { + clientSocket.on('error', err => {if (!globalThis.Object.is(err.code, 'ECONNRESET')) throw err}) stream.pipe(clientSocket).pipe(stream).on('close', () => { stream.end(); });