diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2011-03-30 14:06:52 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2011-03-30 14:06:52 +0100 |
commit | 26b7b740905b3c15559c81cc0e945890ae8ec4d4 (patch) | |
tree | 4a7a1baab6bb7ede6bef7ec7282634391c77d183 | |
parent | a4c348672a43acd05303a38af8c08196924fb650 (diff) | |
download | rabbitmq-server-bug24007.tar.gz |
Make sure Attempts does not go negative.bug24007
-rw-r--r-- | src/rabbit_control.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index 6fb465b5..1af91f4c 100644 --- a/src/rabbit_control.erl +++ b/src/rabbit_control.erl @@ -304,10 +304,9 @@ action(list_permissions, Node, [], Opts, Inform) -> wait_for_application(Node, Attempts) -> case rpc_call(Node, application, which_applications, [infinity]) of - {badrpc, _} = E -> NewAttempts = Attempts - 1, - case NewAttempts of + {badrpc, _} = E -> case Attempts of 0 -> E; - _ -> wait_for_application0(Node, NewAttempts) + _ -> wait_for_application0(Node, Attempts - 1) end; Apps -> case proplists:is_defined(rabbit, Apps) of %% We've seen the node up; if it goes down |