diff options
author | Tim Watson <tim@rabbitmq.com> | 2012-11-21 14:27:51 +0000 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2012-11-21 14:27:51 +0000 |
commit | 4e4ca168d5a40c091a5bd52ef4098a2094b83994 (patch) | |
tree | aa4f22d9aafe7bad32ca6e81cb60a17064834a10 | |
parent | 626e654987a95b8cfb0e85079899de4e0dee2d33 (diff) | |
download | rabbitmq-server-4e4ca168d5a40c091a5bd52ef4098a2094b83994.tar.gz |
branch from stable, expire messages eagerlybug25301
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 6 |
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; |