summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-07-15 11:09:09 +0100
committerSimon MacMullen <simon@rabbitmq.com>2011-07-15 11:09:09 +0100
commit6ee924134ce95a4f081e93ca40c3070f5f65996d (patch)
tree2f6755e5075521014f6157ed028e4b2ce8d3f6f5
parentaaf68b204727137011d19e005ed911b6e1a9d766 (diff)
downloadrabbitmq-server-6ee924134ce95a4f081e93ca40c3070f5f65996d.tar.gz
Do these checks the other way round - if the pid is not running we should fail, even if the node is up. I think.
-rw-r--r--src/rabbit_control.erl14
1 files 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) ->