refactor(emqx_listeners): better variable names

This commit is contained in:
Zaiming (Stone) Shi 2023-05-02 10:42:54 +02:00
parent 29c9edeb4c
commit 674f837f36
1 changed files with 3 additions and 3 deletions

View File

@ -118,14 +118,14 @@ format_raw_listeners({Type0, Conf}) ->
Bind = parse_bind(LConf0), Bind = parse_bind(LConf0),
Running = is_running(Type, listener_id(Type, LName), LConf0#{bind => Bind}), Running = is_running(Type, listener_id(Type, LName), LConf0#{bind => Bind}),
LConf1 = maps:remove(<<"authentication">>, LConf0), LConf1 = maps:remove(<<"authentication">>, LConf0),
LConf3 = maps:put(<<"running">>, Running, LConf1), LConf2 = maps:put(<<"running">>, Running, LConf1),
CurrConn = CurrConn =
case Running of case Running of
true -> current_conns(Type, LName, Bind); true -> current_conns(Type, LName, Bind);
false -> 0 false -> 0
end, end,
LConf4 = maps:put(<<"current_connections">>, CurrConn, LConf3), LConf = maps:put(<<"current_connections">>, CurrConn, LConf2),
{true, {Type0, LName, LConf4}}; {true, {Type0, LName, LConf}};
({_LName, _MarkDel}) -> ({_LName, _MarkDel}) ->
false false
end, end,