The problem here is that it removes the socket but RabbitMQ server has still this connection as opened.
I needed to run connection.destroy() and then connection.end() to make it work, but maybe it would be good to add add everything to .end() and run .end() only.
The problem here is that it removes the socket but RabbitMQ server has still this connection as opened.
I needed to run connection.destroy() and then connection.end() to make it work, but maybe it would be good to add add everything to .end() and run .end() only.