Open reggi opened 8 years ago
Hey @lepture is there any way to close a connection? My process doesn't end with .close()
?
My code is very simple and still wont close :(
import scpClient from 'scp2'
const SSH_HOST = process.env.SSH_HOST
const SSH_USER = process.env.SSH_USER
const SSH_PASS = process.env.SSH_PASS
let buildSCPFile = (file) => `${SSH_USER}:${SSH_PASS}@${SSH_HOST}:/home/user/temp/${file}`
scpClient.scp(buildSCPFile('file.sql'), './temp/file.sql', function(err) {
console.log('done')
scpClient.close()
})
I think scpClient.close() closes the ssh session. To close your process, you can do:
process.exit();
Hey @spmjs thanks for the awesome libray!
I'm unable to close the connection. I have a really simple example like this. No errors occur and the process never exists. Any help would be amazing.