Skip to content

Commit f3bd673

Browse files
rabbit_nodes:await_running_count_with_retries/2: correct type spec and base clause return value
[#156729133] (cherry picked from commit a604fa6)
1 parent 9b9a151 commit f3bd673

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rabbit_nodes.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
-spec all_running() -> [node()].
4343
-spec running_count() -> integer().
4444

45-
-spec await_running_count(integer(), integer()) -> 'ok,' | {'error', atom()}.
46-
4745
%%----------------------------------------------------------------------------
4846

4947
name_type() ->
@@ -94,11 +92,13 @@ all_running() -> rabbit_mnesia:cluster_nodes(running).
9492

9593
running_count() -> length(all_running()).
9694

95+
-spec await_running_count(integer(), integer()) -> 'ok' | {'error', atom()}.
96+
9797
await_running_count(TargetCount, Timeout) ->
9898
Retries = floor(Timeout/?SAMPLING_INTERVAL),
9999
await_running_count_with_retries(TargetCount, Retries).
100100

101-
await_running_count_with_retries(1, _Retries) -> true;
101+
await_running_count_with_retries(1, _Retries) -> ok;
102102
await_running_count_with_retries(_TargetCount, Retries) when Retries =:= 0 ->
103103
{error, timeout};
104104
await_running_count_with_retries(TargetCount, Retries) ->

0 commit comments

Comments
 (0)