diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2010-10-21 12:48:12 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-10-21 12:48:12 +0100 |
commit | b094e9fbf67da0b5cd224b0b70d4ba91140010c3 (patch) | |
tree | d91f233d8cff4668f4efaf71023789053e04a494 | |
parent | 9fde9e069323b6ba50743c75764f4cce19ed5b5b (diff) | |
download | rabbitmq-server-b094e9fbf67da0b5cd224b0b70d4ba91140010c3.tar.gz |
Minor refactor
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 7be5a197..397fe31b 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -459,13 +459,8 @@ requeue_and_run(AckTags, State = #q{backing_queue = BQ, ttl=TTL}) -> fetch(AckRequired, State = #q{backing_queue_state = BQS, backing_queue = BQ}) -> - case BQ:fetch(AckRequired, BQS) of - {empty, BQS1} -> - {empty, State#q{backing_queue_state = BQS1}}; - {{Message, IsDelivered, AckTag, Remaining}, BQS1} -> - {{Message, IsDelivered, AckTag, Remaining}, - State#q{backing_queue_state = BQS1}} - end. + {Result, BQS1} = BQ:fetch(AckRequired, BQS), + {Result, State#q{backing_queue_state = BQS1}}. add_consumer(ChPid, Consumer, Queue) -> queue:in({ChPid, Consumer}, Queue). |