Merge pull request #3011 from emqx/max_subscriptions
Fix max_subscritpions
This commit is contained in:
commit
ad5b954f1d
|
@ -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.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue