diff options
| author | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-12-05 12:19:27 +0000 |
|---|---|---|
| committer | Ayanda Dube <ayanda.dube@erlang-solutions.com> | 2015-12-05 12:19:27 +0000 |
| commit | 85bbed9fa4d47adb5c523f6e3f130d54e435d1b9 (patch) | |
| tree | c7b2589d7415e8e802ee28983f8feb63566a030e | |
| parent | 169a325a66c19d8c92faadfd78cee3a5aac39bde (diff) | |
| download | rabbitmq-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
| -rw-r--r-- | src/rabbit_control_main.erl | 4 |
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), |
