Permalink
Browse files

Check if connected first before running all connected

  • Loading branch information...
1 parent 8f6cfcc commit b01db5a2fb894cf11d496867022a0ba3b2b86491 Tryn Mirell committed Apr 2, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/riaknostic_node.erl
View
@@ -112,9 +112,13 @@ can_connect() ->
-spec can_connect_all() -> true | false.
can_connect_all() ->
- case riaknostic_check_nodes_connected:check() of
- [] -> true;
- _ -> false
+ case is_connected() of
+ true ->
+ case riaknostic_check_nodes_connected:check() of
+ [] -> true;
+ _ -> false
+ end;
+ false -> false
end.
%% @doc Fetches or returns previously fetched Riak statistics.

0 comments on commit b01db5a

Please sign in to comment.