chore(emqx_mgmt_api_listeners): return error tuple
This commit is contained in:
parent
4b43b6532c
commit
c52d241a06
|
@ -65,7 +65,7 @@ restart(#{identifier := Identifier}, _Params) ->
|
|||
Results = [{Node, emqx_mgmt:restart_listener(Node, Identifier)} || {Node, _Info} <- emqx_mgmt:list_nodes()],
|
||||
case lists:filter(fun({_, Result}) -> Result =/= ok end, Results) of
|
||||
[] -> return(ok);
|
||||
Errors -> return({error, Errors})
|
||||
Errors -> return({error, {restart, Errors}})
|
||||
end.
|
||||
|
||||
format(Listeners) when is_list(Listeners) ->
|
||||
|
|
Loading…
Reference in New Issue