feat: support emqx_conf:update([license],Conf)
This commit is contained in:
parent
6551eb21f2
commit
2d2062e504
|
@ -122,9 +122,9 @@ do_update({key, Content}, Conf) when is_binary(Content); is_list(Content) ->
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
erlang:throw(Reason)
|
erlang:throw(Reason)
|
||||||
end;
|
end;
|
||||||
%% We don't do extra action when update license's watermark.
|
do_update(NewConf, _PrevConf) ->
|
||||||
do_update(_Other, Conf) ->
|
#{<<"key">> := NewKey} = NewConf,
|
||||||
Conf.
|
do_update({key, NewKey}, NewConf).
|
||||||
|
|
||||||
check_max_clients_exceeded(MaxClients) ->
|
check_max_clients_exceeded(MaxClients) ->
|
||||||
emqx_license_resources:connection_count() > MaxClients * 1.1.
|
emqx_license_resources:connection_count() > MaxClients * 1.1.
|
||||||
|
|
Loading…
Reference in New Issue