Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closeTunnel has high latency #67

Open
blogwy opened this issue Oct 12, 2021 · 0 comments
Open

closeTunnel has high latency #67

blogwy opened this issue Oct 12, 2021 · 0 comments

Comments

@blogwy
Copy link

blogwy commented Oct 12, 2021

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)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant