Closed simonwjackson closed 5 years ago
const slsk = require('slsk-client') slsk.connect({ user: 'user', pass: 'pass' }, (err, client) => { client.search({ req: 'random', timeout: 2000 }, (err, res) => { if (err) return console.log(err) console.log(res) /* *** Trying to exit *** */ client.destroy() slsk.disconnect() }) })
I cant exit the script without Ctrl-C. Am I doing something wrong here?
Is process.exit() not an option?
process.exit()
I guess so, but It feels a bit hacky to rely on process.exit(). Is there no other way to do this?
Should be fixed in 1.1.0
I cant exit the script without Ctrl-C. Am I doing something wrong here?