From 6ee924134ce95a4f081e93ca40c3070f5f65996d Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Fri, 15 Jul 2011 11:09:09 +0100 Subject: Do these checks the other way round - if the pid is not running we should fail, even if the node is up. I think. --- src/rabbit_control.erl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index 180f4b2d..b1680d95 100644 --- a/src/rabbit_control.erl +++ b/src/rabbit_control.erl @@ -359,13 +359,13 @@ wait_for_application(Node, PidFile, Inform) -> wait_for_application(Node, Pid). wait_for_application(Node, Pid) -> - case node_up(Node) of - true -> ok; - false -> case pid_up(Pid) of - true -> timer:sleep(1000), - wait_for_application(Node, Pid); - false -> {error, {pid_went_away, Pid}} - end + case pid_up(Pid) of + true -> case node_up(Node) of + true -> ok; + false -> timer:sleep(1000), + wait_for_application(Node, Pid) + end; + false -> {error, pid_not_running} end. wait_and_read_pid_file(PidFile) -> -- cgit v1.2.1