summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2012-11-21 14:27:51 +0000
committerTim Watson <tim@rabbitmq.com>2012-11-21 14:27:51 +0000
commit4e4ca168d5a40c091a5bd52ef4098a2094b83994 (patch)
treeaa4f22d9aafe7bad32ca6e81cb60a17064834a10
parent626e654987a95b8cfb0e85079899de4e0dee2d33 (diff)
downloadrabbitmq-server-4e4ca168d5a40c091a5bd52ef4098a2094b83994.tar.gz
branch from stable, expire messages eagerlybug25301
-rw-r--r--src/rabbit_amqqueue_process.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index f87f5777..68bd1c6c 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -485,9 +485,11 @@ deliver_msg_to_consumer(DeliverFun,
{Stop, State1}.
deliver_from_queue_deliver(AckRequired, State) ->
- {{Message, IsDelivered, AckTag, Remaining}, State1} =
+ {{Message, IsDelivered, AckTag, _Remaining}, State1} =
fetch(AckRequired, State),
- {{Message, IsDelivered, AckTag}, 0 == Remaining, State1}.
+ State2 = #q{backing_queue = BQ, backing_queue_state = BQS} =
+ drop_expired_messages(State1),
+ {{Message, IsDelivered, AckTag}, BQ:is_empty(BQS), State2}.
confirm_messages([], State) ->
State;