summaryrefslogtreecommitdiff
path: root/src/rabbit_mirror_queue_misc.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-08-19 14:55:42 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-08-19 14:55:42 +0100
commit640fc3b30d9044e94b8466f233b58fe9dd5876cd (patch)
treebd6b03456c7a4d1009acd2ac7d93041ab97cb1f9 /src/rabbit_mirror_queue_misc.erl
parentf0ee2e3a51f3635c69b0058283cb58d1ef35530a (diff)
downloadrabbitmq-server-640fc3b30d9044e94b8466f233b58fe9dd5876cd.tar.gz
Roll slave startup into the new mechanism.
Diffstat (limited to 'src/rabbit_mirror_queue_misc.erl')
-rw-r--r--src/rabbit_mirror_queue_misc.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl
index 9e8c4a18..86f73366 100644
--- a/src/rabbit_mirror_queue_misc.erl
+++ b/src/rabbit_mirror_queue_misc.erl
@@ -220,11 +220,13 @@ start_child(Name, MirrorNode, Q, SyncMode) ->
rabbit_misc:with_exit_handler(
rabbit_misc:const(ok),
fun () ->
- {ok, SPid} = rabbit_mirror_queue_slave_sup:start_child(
- MirrorNode, [Q]),
+ SPid = rabbit_amqqueue_sup:start_queue_process(MirrorNode, Q),
log_info(Name, "Adding mirror on node ~p: ~p~n",
[MirrorNode, SPid]),
- rabbit_mirror_queue_slave:go(SPid, SyncMode)
+ case SyncMode of
+ sync -> rabbit_mirror_queue_slave:await(SPid);
+ async -> ok
+ end
end).
report_deaths(_MirrorPid, _IsMaster, _QueueName, []) ->