diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-02-01 11:54:20 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-02-01 11:54:20 +0000 |
commit | 8e488ff65f678e7ecdc1dc9ba9daed1efed00a39 (patch) | |
tree | aeba7033f18769066a19bd3bdc645bd90b7797be | |
parent | cc6997e78e6a3d0f6d31cbfe941f985e38090cf4 (diff) | |
download | rabbitmq-server-bug24713.tar.gz |
Don't claim to be adding mirror when we're not.bug24713
-rw-r--r-- | src/rabbit_mirror_queue_misc.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl index d1caf5aa..226fbea0 100644 --- a/src/rabbit_mirror_queue_misc.erl +++ b/src/rabbit_mirror_queue_misc.erl @@ -136,12 +136,16 @@ add_mirror(Queue, MirrorNode) -> case [Pid || Pid <- [QPid | SPids], node(Pid) =:= MirrorNode] of [] -> Result = rabbit_mirror_queue_slave_sup:start_child( MirrorNode, [Q]), - rabbit_log:info( - "Adding mirror of ~s on node ~p: ~p~n", - [rabbit_misc:rs(Name), MirrorNode, Result]), case Result of - {ok, _Pid} -> ok; - _ -> Result + {ok, undefined} -> %% Already running + ok; + {ok, _Pid} -> + rabbit_log:info( + "Adding mirror of ~s on node ~p: ~p~n", + [rabbit_misc:rs(Name), MirrorNode, Result]), + ok; + _ -> + Result end; [_] -> {error, {queue_already_mirrored_on_node, MirrorNode}} end |