diff options
-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; |