summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_priority_queue.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rabbit_priority_queue.erl b/src/rabbit_priority_queue.erl
index b58a8c535e..6141796f7b 100644
--- a/src/rabbit_priority_queue.erl
+++ b/src/rabbit_priority_queue.erl
@@ -563,8 +563,9 @@ findfold3(Fun, Acc, NotFound, [{P, BQSN} | Rest], BQSAcc) ->
findfold3(_Fun, Acc, NotFound, [], BQSAcc) ->
{NotFound, Acc, lists:reverse(BQSAcc)}.
-bq_fetch(P, []) -> exit({not_found, P});
+bq_fetch(P, []) -> exit({not_found, P});
bq_fetch(P, [{P, BQSN} | _]) -> BQSN;
+bq_fetch(P, [{P1, BQSN} | _]) when P > P1 -> BQSN;
bq_fetch(P, [{_, _BQSN} | T]) -> bq_fetch(P, T).
bq_store(P, BQS, BQSs) ->