How to shutdown?
Closed this issue · 1 comments
marcoreni commented
Hello,
I'm trying to perform some tests using Jest.
Jest returned an error about open Handlers, and after some debugging it seems that a nats connection is left open.
I tried to check if there was a way to close nats connection inside hemera-nats-streaming, but it seems that the onClose handler does nothing:
https://github.com/hemerajs/hemera-nats-streaming/blob/master/index.js#L35
Shouldn't this function close the connection to nats server? Is there any other way to gracefully shutdown the connection?
StarpTech commented
Hi @marcoreni,
you're right we should close the nats-streaming connection at this point. Would you send a PR?