feat: support emqx_conf:update([license],Conf)

This commit is contained in:
某文 2023-05-28 23:11:47 +08:00
parent c2450d230d
commit 47b962b49b
1 changed files with 3 additions and 3 deletions

View File

@ -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.