postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

Fix for issue #246: Connection does not close cleanly #248

Closed cmoesel closed 10 years ago

cmoesel commented 11 years ago

Without this modification, calls to connection.end will close the socket without notifying the RabbitMQ server. This results in a warning in the RabbitMQ logs stating that the connection was closed abruptly.

This fix follows the AMQP 0-9-1 specification by sending the connectionClose method to the server and waiting for a connectionCloseOk response before closing the connection.

aw commented 10 years ago

:+1: :sparkles:

cmoesel commented 10 years ago

I just discovered an issue that caused some tests to fail and I fixed it. All tests (including the new test for this feature) are now PASSING. Please merge or provide feedback to me if you need something else.

gjohnson commented 10 years ago

:+1:

postwait commented 10 years ago

merged a combo of this and #295