diff options
author | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-01-25 12:21:02 +0000 |
---|---|---|
committer | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-01-25 12:21:02 +0000 |
commit | 8966131b683b125eabb3442ed69f1bd8000f6224 (patch) | |
tree | 920b6c4bbf8be58266332669d76f5781e572218f | |
parent | 998fbf33a760f9e41621b0999ddfac7c5f3fcc19 (diff) | |
download | rabbitmq-server-8966131b683b125eabb3442ed69f1bd8000f6224.tar.gz |
Fix to reject_tx, list comprehension instead of map.
-rw-r--r-- | src/rabbit_channel.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 474a5a91..e03be3a0 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1089,7 +1089,7 @@ handle_method(#'tx.rollback'{}, _, #ch{tx_status = none}) -> handle_method(#'tx.rollback'{}, _, State = #ch{unacked_message_q = UAMQ, uncommitted_acks = TAL, uncommitted_nacks = TNL}) -> - TNL1 = lists:append(lists:map(fun ({_, L}) -> L end, TNL)), + TNL1 = lists:append([L || {_, L} <- TNL]), UAMQ1 = queue:from_list(lists:usort(TAL ++ TNL1 ++ queue:to_list(UAMQ))), {reply, #'tx.rollback_ok'{}, new_tx(State#ch{unacked_message_q = UAMQ1})}; @@ -1282,7 +1282,8 @@ reject_tx(DeliveryTag, Multiple, Requeue, State1 = State#ch{unacked_message_q = Remaining}, {noreply, case TxStatus of - none -> reject(Requeue, Acked, State); + none -> reject(Requeue, Acked, State1), + State1; in_progress -> State1#ch{uncommitted_nacks = {Requeue, Acked} ++ State1#ch.uncommitted_nacks} |