diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2012-04-19 16:19:17 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2012-04-19 16:19:17 +0100 |
| commit | 9fec1a7539f7c513905836b7d114f556c9a9fba2 (patch) | |
| tree | 3a0841e382e03d9a2a320e1a246ec10617e5e84b | |
| parent | c2cbef7186e47702d5eabc547940b931b16c28af (diff) | |
| download | rabbitmq-server-git-9fec1a7539f7c513905836b7d114f556c9a9fba2.tar.gz | |
In general, avoid unnecessary interleaving of mutating state
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 0703bffcc0..07c86672c1 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -1237,9 +1237,9 @@ handle_cast({reject, AckTags, Requeue, ChPid}, State) -> true -> fun (State1) -> requeue_and_run(AckTags, State1) end; false -> - Fun = dead_letter_fun(rejected, State), fun (State1 = #q{backing_queue = BQ, backing_queue_state = BQS}) -> + Fun = dead_letter_fun(rejected, State1), BQS1 = BQ:fold(Fun, BQS, AckTags), ack_if_no_dlx( AckTags, State1#q{backing_queue_state = BQS1}) |
