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

This commit is contained in:
某文 2023-05-28 23:11:47 +08:00 committed by Zhongwen Deng
parent 6551eb21f2
commit 2d2062e504
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} ->
erlang:throw(Reason)
end;
%% We don't do extra action when update license's watermark.
do_update(_Other, Conf) ->
Conf.
do_update(NewConf, _PrevConf) ->
#{<<"key">> := NewKey} = NewConf,
do_update({key, NewKey}, NewConf).
check_max_clients_exceeded(MaxClients) ->
emqx_license_resources:connection_count() > MaxClients * 1.1.