fix(api): query client subscriptions from cluster empty check
This commit is contained in:
parent
a3e3f2216c
commit
6b020b4a01
|
@ -269,10 +269,14 @@ list_authz_cache(ClientId) ->
|
||||||
|
|
||||||
list_client_subscriptions(ClientId) ->
|
list_client_subscriptions(ClientId) ->
|
||||||
Results = [client_subscriptions(Node, ClientId) || Node <- mria_mnesia:running_nodes()],
|
Results = [client_subscriptions(Node, ClientId) || Node <- mria_mnesia:running_nodes()],
|
||||||
Expected = lists:filter(fun({error, _}) -> false;
|
Filter =
|
||||||
([]) -> false;
|
fun
|
||||||
(_) -> true
|
({error, _}) ->
|
||||||
end, Results),
|
false;
|
||||||
|
({_Node, List}) ->
|
||||||
|
erlang:is_list(List) andalso 0 < erlang:length(List)
|
||||||
|
end,
|
||||||
|
Expected = lists:filter(Filter, Results),
|
||||||
case Expected of
|
case Expected of
|
||||||
[] -> [];
|
[] -> [];
|
||||||
[Result | _] -> Result
|
[Result | _] -> Result
|
||||||
|
|
Loading…
Reference in New Issue