Open handle after unsuccessful call to `.connect` keeps process running
See original GitHub issueIf a call to .connect fails, the module prevents the process from exiting gracefully and a call to process.exit is needed, which should not be the case.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Open handle keeps Jest from exiting ( TCPSERVERWRAP)
Jest has detected the following 1 open handle potentially keeping Jest from exiting: ○ TCPSERVERWRAP 27 | test('The GET /status route ...
Read more >Async external function leaves open handles - Jest, Supertest ...
This open handles are generated by an external async function that is being called within my test file. I'm using an external function...
Read more >Let It Crash: Best Practices for Handling Node.js Errors on ...
If the process crashes due to a failure, the process monitor is in charge of restarting the process. Our recommendation is to always...
Read more >"Cannot connect the computer to the server" error message ...
Resolution. Important To fix this problem, first restart the computer. If the restart does not fix the problem, and you want us to...
Read more >A Guide to Error Handling in Express.js | Scout APM Blog
Error handling often doesn't get the attention it deserves. Mishandled errors can lead to a bad UX and negatively affect your business.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hmm, that’s interesting. I cannot reproduce that behavior using this simplified test case:
After closing the
clientinstance the process terminates immediately in my case.PRs to improve the documentation are always welcome! The
AerospikeErrordocs already mention about the referenced client instance and the fact that it can be used to close the connection in the case of errors: https://www.aerospike.com/apidocs/nodejs/AerospikeError.html#client. (Generated from lib/error.js.) But probably this is not very discoverable and there might be other places where this information is missing?The referenced client object should be the same. Let me know if calling
client.close()does not release all event loop handles either in your case. Btw, what client version are you using?