How To Shut Down `ssh2` Sftp Server Programatically
I am using the
ssh2 library to create a sftp server for testing during my testing suite. The server starts successfully and tests run as expected - all is great.
However, after all of the tests have been conducted the testing script does not exit as the sftp server process is still listening/executing.
How can I programatically shut down the sftp server?
From the docs:
Server instances also have the same methods/properties/events as
These look promising:
- → Maximum call stack exceeded when instantiating class inside of a module
- → Browserify api: how to pass advanced option to script
- → Node.js Passing object from server.js to external modules?
- → gulp-rename makes copies, but does not replace
- → requiring RX.js in node.js
- → Remove an ObjectId from an array of objectId
- → Can not connect to Redis
- → React: How to publish page on server using React-starter-kit
- → Express - better pattern for passing data between middleware functions
- → Can't get plotly + node.js to stream data coming through POST requests
- → IsGenerator implementation
- → Async/Await not waiting
- → (Socket.io on nodejs) Updating div with mysql data stops without showing error