From 2e55dc4d5db9f4c782c96e16a0769bd9e86d9f1b Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Wed, 6 Mar 2013 15:45:47 +0000 Subject: Register the process name to make sure we only have one running at a time. --- src/rabbit_node_monitor.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl index 55b078c3..47c753e3 100644 --- a/src/rabbit_node_monitor.erl +++ b/src/rabbit_node_monitor.erl @@ -312,6 +312,9 @@ await_cluster_recovery() -> %% If our group leader is inside an application we are about %% to stop, application:stop/1 does not return. group_leader(whereis(init), self()), + %% Ensure only one restarting process at a time, will + %% exit(badarg) (harmlessly) if one is already running + register(rabbit_restarting_process, self()), rabbit:stop(), wait_for_cluster_recovery(Nodes) end). -- cgit v1.2.1