Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit 2c2ef7f

Browse files
committed
Close the connection when download is complete
1 parent b27058d commit 2c2ef7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ Client.prototype.download = function(src, dest, callback) {
290290
sftp_readStream.pipe(fs.createWriteStream(dest))
291291
.on('close',function(){
292292
self.emit('read', src);
293+
self.close();
293294
callback(null);
294295
})
295296
.on('error', function(err){

0 commit comments

Comments
 (0)