From 5b11877cf6b76552b702a84e79f57fe54ade69cd Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Thu, 30 Jun 2022 17:42:36 +0100 Subject: [PATCH] NEW return this from SFTP.destroy() and SFTP.end() --- lib/protocol/SFTP.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/protocol/SFTP.js b/lib/protocol/SFTP.js index a7fc4f90..96c2c325 100644 --- a/lib/protocol/SFTP.js +++ b/lib/protocol/SFTP.js @@ -282,12 +282,14 @@ class SFTP extends EventEmitter { end() { this.destroy(); + return this; } destroy() { if (this.outgoing.state === 'open' || this.outgoing.state === 'eof') { this.outgoing.state = 'closing'; this._protocol.channelClose(this.outgoing.id); } + return this; } _init() { this._init = noop;