Merge pull request #3011 from emqx/max_subscriptions

Fix max_subscritpions
This commit is contained in:
tigercl 2019-11-01 21:04:43 +08:00 committed by GitHub
commit ad5b954f1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.