node-ftp
node-ftp copied to clipboard
connecting prevents process from exiting
In my use case, I make a client just to stream one file from a server, and then I close the connection. Trouble is there's a _keepalive timer that appears to be recurring, so when I call .destroy() the keepalive is still going, preventing the process from exiting (without a force quit, which I want to avoid)
I think this is because I'm calling client.destroy() in the stream.on('close') handler. If I call client.destroy() in the next tick, it works. There is probably a conflicting close handler somewhere that overwrites my destroy() call