From a0b66cae63bf62e432b6d2e52a9d39f1703f07bf Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Mon, 20 May 2013 12:23:11 +0100 Subject: Pass through tx'ed acks and rejects in the correct order. --- src/rabbit_channel.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 37041d34..1de14b5c 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1085,8 +1085,9 @@ handle_method(#'tx.commit'{}, _, #ch{tx = none}) -> handle_method(#'tx.commit'{}, _, State = #ch{tx = {Msgs, Acks}, limiter = Limiter}) -> State1 = rabbit_misc:queue_fold(fun deliver_to_queues/2, State, Msgs), - lists:foreach(fun ({ack, A}) -> ack(A, State1); - ({Requeue, A}) -> reject(Requeue, A, Limiter) + Rev = fun (X) -> lists:reverse(lists:sort(X)) end, + lists:foreach(fun ({ack, A}) -> ack(Rev(A), State1); + ({Requeue, A}) -> reject(Requeue, Rev(A), Limiter) end, lists:reverse(Acks)), {noreply, maybe_complete_tx(State1#ch{tx = committing})}; -- cgit v1.2.1