From 367ffc0b802cd3ad4f63867b35aaf90188e11a2a Mon Sep 17 00:00:00 2001 From: "matthias.pompe" Date: Wed, 2 Dec 2020 11:10:58 +0100 Subject: [PATCH] fix socket hung up for concurrent requests --- lib/ssh.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ssh.js b/lib/ssh.js index f650413..5f6e559 100644 --- a/lib/ssh.js +++ b/lib/ssh.js @@ -2,10 +2,10 @@ var Client = require('ssh2').Client, http = require('http'); module.exports = function(opt) { - var conn = new Client(); var agent = new http.Agent(); - + agent.createConnection = function(options, fn) { + var conn = new Client(); conn.once('ready', function() { conn.exec('docker system dial-stdio', function(err, stream) { if (err) {