diff options
author | Emile Joubert <emile@rabbitmq.com> | 2013-09-11 13:26:42 +0100 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2013-09-11 13:26:42 +0100 |
commit | f149982c195173fbee56e23be8fa975d24d143fa (patch) | |
tree | e41d490290e7c70d5d524279f428717e672bffe3 /src/rabbit_mirror_queue_misc.erl | |
parent | 147ba4837bf72265044932a0cc785e53ce68608d (diff) | |
parent | e028894e2c90e21fc2a1260b61ddffdbb22787ea (diff) | |
download | rabbitmq-server-f149982c195173fbee56e23be8fa975d24d143fa.tar.gz |
Merged stable into default
Diffstat (limited to 'src/rabbit_mirror_queue_misc.erl')
-rw-r--r-- | src/rabbit_mirror_queue_misc.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl index eded0411..a3f37877 100644 --- a/src/rabbit_mirror_queue_misc.erl +++ b/src/rabbit_mirror_queue_misc.erl @@ -69,7 +69,7 @@ %% slave (now master) receives messages it's not ready for (for %% example, new consumers). %% Returns {ok, NewMPid, DeadPids} -remove_from_queue(QueueName, Self, DeadGMPids) -> +remove_from_queue(QueueName, Self, LiveGMPids) -> rabbit_misc:execute_mnesia_transaction( fun () -> %% Someone else could have deleted the queue before we @@ -79,9 +79,9 @@ remove_from_queue(QueueName, Self, DeadGMPids) -> [Q = #amqqueue { pid = QPid, slave_pids = SPids, gm_pids = GMPids }] -> - {Dead, GMPids1} = lists:partition( + {GMPids1, Dead} = lists:partition( fun ({GM, _}) -> - lists:member(GM, DeadGMPids) + lists:member(GM, LiveGMPids) end, GMPids), DeadPids = [Pid || {_GM, Pid} <- Dead], Alive = [QPid | SPids] -- DeadPids, |