sanketbajoria / ssh2-promise

ssh with promise/async await and typescript support
https://www.npmjs.com/package/ssh2-promise
MIT License
148 stars 25 forks source link

closeTunnel has high latency #67

Open blogwy opened 3 years ago

blogwy commented 3 years ago

After I run closeTunnel, the tunnel website can still be accessed. Then it took 2 minutes for the tunnel to be completely closed

const SSH2Promise = require('ssh2-promise')

const sshconfig = { host: 'xxxxx', username: 'xxxx', password: 'xxxx', port: 'xxxx' }

const tunnelConfig = { name: 'hahaha', remoteAddr: 'localhost', remotePort: '80' }

var ssh = new SSH2Promise(sshconfig);

ssh.addTunnel(tunnelConfig).then((tunnel) => { console.log(tunnel.localPort); });

ssh.closeTunnel('hahaha') .then(res => { console.log('24') console.log(res) }) .catch(err => { console.log('28') console.log(err) })

dubdia commented 2 months ago

i have the same issue. closeTunnel just hangs :/