fix: crash on emqx_ctl listeners
This commit is contained in:
parent
e818c0b528
commit
6efb07f6eb
|
@ -616,6 +616,8 @@ listeners([]) ->
|
||||||
Acceptors = maps:get(acceptors, Conf),
|
Acceptors = maps:get(acceptors, Conf),
|
||||||
ProxyProtocol = maps:get(proxy_protocol, Conf, undefined),
|
ProxyProtocol = maps:get(proxy_protocol, Conf, undefined),
|
||||||
Running = maps:get(running, Conf),
|
Running = maps:get(running, Conf),
|
||||||
|
case Running of
|
||||||
|
true ->
|
||||||
CurrentConns =
|
CurrentConns =
|
||||||
case emqx_listeners:current_conns(ID, Bind) of
|
case emqx_listeners:current_conns(ID, Bind) of
|
||||||
{error, _} -> [];
|
{error, _} -> [];
|
||||||
|
@ -630,6 +632,11 @@ listeners([]) ->
|
||||||
case emqx_listeners:shutdown_count(ID, Bind) of
|
case emqx_listeners:shutdown_count(ID, Bind) of
|
||||||
{error, _} -> [];
|
{error, _} -> [];
|
||||||
SC -> [{shutdown_count, SC}]
|
SC -> [{shutdown_count, SC}]
|
||||||
|
end;
|
||||||
|
false ->
|
||||||
|
CurrentConns = [],
|
||||||
|
MaxConn = [],
|
||||||
|
ShutdownCount = []
|
||||||
end,
|
end,
|
||||||
Info =
|
Info =
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue