fix(listeners): add limiter info into the listener config
This commit is contained in:
parent
596005ca5f
commit
b394d18852
|
@ -99,8 +99,7 @@ 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),
|
||||||
LConf2 = maps:remove(<<"limiter">>, LConf1),
|
LConf3 = maps:put(<<"running">>, Running, LConf1),
|
||||||
LConf3 = maps:put(<<"running">>, Running, LConf2),
|
|
||||||
CurrConn =
|
CurrConn =
|
||||||
case Running of
|
case Running of
|
||||||
true -> current_conns(Type, LName, Bind);
|
true -> current_conns(Type, LName, Bind);
|
||||||
|
|
|
@ -235,8 +235,7 @@ listeners_info(Opts) ->
|
||||||
fun({Type, #{type := ?MAP(_Name, ?R_REF(Mod, Field))}}) ->
|
fun({Type, #{type := ?MAP(_Name, ?R_REF(Mod, Field))}}) ->
|
||||||
Fields0 = hocon_schema:fields(Mod, Field),
|
Fields0 = hocon_schema:fields(Mod, Field),
|
||||||
Fields1 = lists:keydelete("authentication", 1, Fields0),
|
Fields1 = lists:keydelete("authentication", 1, Fields0),
|
||||||
Fields2 = lists:keydelete("limiter", 1, Fields1),
|
Fields3 = required_bind(Fields1, Opts),
|
||||||
Fields3 = required_bind(Fields2, Opts),
|
|
||||||
Ref = listeners_ref(Type, Opts),
|
Ref = listeners_ref(Type, Opts),
|
||||||
TypeAtom = list_to_existing_atom(Type),
|
TypeAtom = list_to_existing_atom(Type),
|
||||||
#{
|
#{
|
||||||
|
|
Loading…
Reference in New Issue