Fix max_subscritpions

This commit is contained in:
zhouzb 2019-11-01 16:27:03 +08:00
parent 1150e06d18
commit 21293140d3
1 changed files with 2 additions and 2 deletions

View File

@ -1147,8 +1147,8 @@ do_subscribe(ClientId, Username, Topic, SubOpts, SubMap) ->
maps:put(Topic, SubOpts, SubMap) maps:put(Topic, SubOpts, SubMap)
end. end.
exceeded_subscription_quota(0, SubMap) -> exceeded_subscription_quota(0, _SubMap) ->
false; false;
exceeded_subscription_quota(Max, SubMap) -> exceeded_subscription_quota(Max, SubMap) ->
Max > maps:size(SubMap). maps:size(SubMap) >= Max.