Closed dchankhour closed 10 years ago
I was able to solve the issue by using conn.destroy() but i had to revert to an older version. it seems that the new version has an issue with disconnect().
Same issue, can u reopen/explain what is the right way to completely close a connection?
connection.disconnect()
triggers a ECONNRESET
error and immediately tries to reconnect. Therefore the ready
event is emitted. In order to disconnect from amqp, I needed to call connection.destroy()
as well.
Why is this not in the documentation and why is connection.disconnect()
not working?
I have a situation where i'm going to be creating multiple connections to Rabbit. But i'm try to be smart about the connections and try to remove them if there are no need for it. However, it seems that when i try to do a conn.disconnect(), the connection actually closes but it reconnects and the conn.on("ready") function is fired back.
Is there a better way to disconnect the TCP connection.