If we don't do this the open callback for the exchange may fire prior to this._sequence gets initialized, so
the code that handles confirmation acks won't match the values saved on messages awaiting
confirmation and the confirmation callback never fires.
I'd have contributed tests, but I can't get the test suite to pass on my machine in a clean clone of postwait/master. Regardless, I thought I'd submit anyway. Without this change, the callback passed into exchange.publish never fires, and with it things work as expected within my application.
If we don't do this the open callback for the exchange may fire prior to this._sequence gets initialized, so the code that handles confirmation acks won't match the values saved on messages awaiting confirmation and the confirmation callback never fires.
I'd have contributed tests, but I can't get the test suite to pass on my machine in a clean clone of postwait/master. Regardless, I thought I'd submit anyway. Without this change, the callback passed into exchange.publish never fires, and with it things work as expected within my application.