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 | 0bbb2b2f93e39be73aa1c39d2c10b8175bac32ae (patch) | |
| tree | aeba7033f18769066a19bd3bdc645bd90b7797be /src | |
| parent | b532b76c70bab963c3942c7443b3b89281b28caa (diff) | |
| download | rabbitmq-server-git-0bbb2b2f93e39be73aa1c39d2c10b8175bac32ae.tar.gz | |
Don't claim to be adding mirror when we're not.
Diffstat (limited to 'src')
| -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 d1caf5aa68..226fbea073 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 |
