Fix subscribe failed

This commit is contained in:
周子博 2019-08-09 11:26:40 +08:00
parent a2d5b834da
commit 22f4e0ecd6
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ check_sub(Zone, Topic, SubOpts) ->
do_check_sub(Flags, Caps).
do_check_sub(#{topic_levels := Levels}, #{max_topic_levels := Limit})
when Levels > Limit ->
when Limit =/= 0 andalso Levels > Limit ->
{error, ?RC_TOPIC_FILTER_INVALID};
do_check_sub(#{is_wildcard := true}, #{wildcard_subscription := false}) ->
{error, ?RC_WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED};