Merge pull request #11086 from zhongwencool/crash-listeners
fix: crash on emqx_ctl listeners
This commit is contained in:
commit
b7deac6b79
|
@ -18,7 +18,12 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apk update && apk add git curl
|
apk update && apk add git curl
|
||||||
git clone -b develop-5.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing
|
## Use 5.1.0 to bypass the newly added test cases in
|
||||||
|
## https://github.com/emqx/paho.mqtt.testing/pull/13
|
||||||
|
## This is a temporary solution for 5.1.0 release. After 5.1.0 release, we should use
|
||||||
|
## the develop-5.0 branch
|
||||||
|
git clone -b 5.1.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing
|
||||||
|
|
||||||
pip install pytest==7.1.2 pytest-retry
|
pip install pytest==7.1.2 pytest-retry
|
||||||
|
|
||||||
pytest --retries 3 -v /paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "$TARGET_HOST"
|
pytest --retries 3 -v /paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "$TARGET_HOST"
|
||||||
|
|
|
@ -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