Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Process kept alive even after close() and destroy() are called #217

Open
MattIPv4 opened this issue Jan 12, 2021 · 1 comment
Open

Process kept alive even after close() and destroy() are called #217

MattIPv4 opened this issue Jan 12, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@MattIPv4
Copy link

I have a client that connects to IRC and posts a single message before then disconnecting.

ChatClient#connect and ChatClient#jon both return promises, but ChatClient#close and ChatClient#destroy do not.

When I call ChatClient#close before then going to exit the script, it hangs for ages before eventually exiting (though sometimes it seems to hang forever -- 6hrs before GitHub Actions killed it).

What's going on? What is the proper way to close the connection and ensure its actually closed, in a sensible time period?

@RAnders00
Copy link
Contributor

It's probably a bug. In the meanwhile if it's just a script, you could try process.exit.

@RAnders00 RAnders00 added the bug Something isn't working label Jan 12, 2021
@RAnders00 RAnders00 changed the title How to close connection properly Process kept alive even after close() and destroy() are called Jan 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants