diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-08-13 15:39:02 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-08-13 15:39:02 +0100 |
commit | 5823a6a220788070370022598e85a7011b88d178 (patch) | |
tree | 4f686e693fa85ba6b80943024ac906cde0047992 | |
parent | 044eacc970aa652207098512601eefa074aa1df9 (diff) | |
download | rabbitmq-server-5823a6a220788070370022598e85a7011b88d178.tar.gz |
Silence the badarg on two near-simultaneous pauses.bug25710
-rw-r--r-- | src/rabbit_node_monitor.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl index 0e6028c6..57dce7cd 100644 --- a/src/rabbit_node_monitor.erl +++ b/src/rabbit_node_monitor.erl @@ -386,10 +386,12 @@ run_outside_applications(Fun) -> %% 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 such process at a time, will - %% exit(badarg) (harmlessly) if one is already running - register(rabbit_outside_app_process, self()), - Fun() + %% Ensure only one such process at a time, the + %% exit(badarg) is harmless if one is already running + try register(rabbit_outside_app_process, self()) of + true -> Fun() + catch error:badarg -> ok + end end). wait_for_cluster_recovery(Nodes) -> |