summaryrefslogtreecommitdiff
path: root/src/rabbit_control.erl
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-08-25 22:31:00 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2011-08-25 22:31:00 +0100
commit4456a1a46b36b472cc29641cee5fe7e15da5393a (patch)
tree3760413417c6b641373dc4b3a60d49736583f84e /src/rabbit_control.erl
parent3b39cf36cdcee0cd1ae197238904ab5eaf70c096 (diff)
downloadrabbitmq-server-4456a1a46b36b472cc29641cee5fe7e15da5393a.tar.gz
one way to check whether rabbit is runningbug24377
and avoid timeouts in application:which_applications() in doing so
Diffstat (limited to 'src/rabbit_control.erl')
-rw-r--r--src/rabbit_control.erl8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index b9e550c9..d920ca31 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -362,7 +362,7 @@ wait_for_application(Node, PidFile, Inform) ->
wait_for_application(Node, Pid) ->
case process_up(Pid) of
- true -> case node_up(Node) of
+ true -> case rabbit:is_running(Node) of
true -> ok;
false -> timer:sleep(1000),
wait_for_application(Node, Pid)
@@ -378,12 +378,6 @@ wait_and_read_pid_file(PidFile) ->
{error, _} = E -> exit({error, {could_not_read_pid, E}})
end.
-node_up(Node) ->
- case rpc_call(Node, application, which_applications, [infinity]) of
- {badrpc, _} -> false;
- Apps -> proplists:is_defined(rabbit, Apps)
- end.
-
% Test using some OS clunkiness since we shouldn't trust
% rpc:call(os, getpid, []) at this point
process_up(Pid) ->