summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-04-27 12:06:37 +0100
committerMatthew Sackman <matthew@lshift.net>2010-04-27 12:06:37 +0100
commit951103a3b68add0f9d44fc3a3fad5d999783f0eb (patch)
treef7c7c43d5f1df00e14f1960f57e16816c8e5207e /src
parent16ab3b0f892cffc95af60066794d6a7c3e9fc484 (diff)
downloadrabbitmq-server-git-951103a3b68add0f9d44fc3a3fad5d999783f0eb.tar.gz
Turns out on commit, the msgs really really should go at the end of the queue, not the head of the queue
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_invariable_queue.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_invariable_queue.erl b/src/rabbit_invariable_queue.erl
index fa11b9761d..bee97651d6 100644
--- a/src/rabbit_invariable_queue.erl
+++ b/src/rabbit_invariable_queue.erl
@@ -154,8 +154,8 @@ tx_commit(Txn, Fun, State = #iv_state { qname = QName, pending_ack = PA,
Fun(),
AckTags1 = lists:flatten(AckTags),
PA1 = remove_acks(AckTags1, PA),
- {Q1, Len1} = lists:foldl(fun (Msg, {QN, LenN}) ->
- {queue:in_r({Msg, false}, QN), LenN + 1}
+ {Q1, Len1} = lists:foldr(fun (Msg, {QN, LenN}) ->
+ {queue:in({Msg, false}, QN), LenN + 1}
end, {Q, Len}, PubsRev),
{AckTags1, State #iv_state { pending_ack = PA1, queue = Q1, len = Len1 }}.