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 | bdbd20c64a3eaebf4687789b46aade6cb48eccbe (patch) | |
| tree | 920b6c4bbf8be58266332669d76f5781e572218f | |
| parent | efd4e3e9a5c731bc4f7a2141de936c131e630ca0 (diff) | |
| download | rabbitmq-server-git-bdbd20c64a3eaebf4687789b46aade6cb48eccbe.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 474a5a91e6..e03be3a0d3 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} |
