summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAyanda Dube <ayanda.dube@erlang-solutions.com>2015-12-05 12:19:27 +0000
committerAyanda Dube <ayanda.dube@erlang-solutions.com>2015-12-05 12:19:27 +0000
commit85bbed9fa4d47adb5c523f6e3f130d54e435d1b9 (patch)
treec7b2589d7415e8e802ee28983f8feb63566a030e /src
parent169a325a66c19d8c92faadfd78cee3a5aac39bde (diff)
downloadrabbitmq-server-git-85bbed9fa4d47adb5c523f6e3f130d54e435d1b9.tar.gz
Makes net_adm:ping/1 be executed whilst in distributed mode,
before net_kernel:stop/1. Otherwise it would always fail to ping the node. References #470
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_control_main.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl
index 53b4d4c6b3..057a9f4e44 100644
--- a/src/rabbit_control_main.erl
+++ b/src/rabbit_control_main.erl
@@ -677,10 +677,10 @@ read_pid_file(PidFile, Wait) ->
become(BecomeNode) ->
error_logger:tty(false),
- ok = net_kernel:stop(),
case net_adm:ping(BecomeNode) of
pong -> exit({node_running, BecomeNode});
- pang -> io:format(" * Impersonating node: ~s...", [BecomeNode]),
+ pang -> ok = net_kernel:stop(),
+ io:format(" * Impersonating node: ~s...", [BecomeNode]),
{ok, _} = rabbit_cli:start_distribution(BecomeNode),
io:format(" done~n", []),
Dir = mnesia:system_info(directory),