dank-twitch-irc icon indicating copy to clipboard operation
dank-twitch-irc copied to clipboard

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

Open MattIPv4 opened this issue 4 years ago • 1 comments
trafficstars

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?

MattIPv4 avatar Jan 12 '21 12:01 MattIPv4

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

RAnders00 avatar Jan 12 '21 14:01 RAnders00