Fix the reverse match

This commit is contained in:
周子博 2018-09-07 18:32:03 +08:00
parent 1326e89593
commit 6f6e24592b
1 changed files with 2 additions and 2 deletions

View File

@ -190,8 +190,8 @@ parse(Topic = <<"$share/", Topic1/binary>>, Options) ->
[_] -> error({invalid_topic, Topic});
[Group, Topic2] ->
case binary:match(Group, [<<"/">>, <<"+">>, <<"#">>]) of
nomatch -> error({invalid_topic, Topic});
_ -> {Topic2, maps:put(share, Group, Options)}
nomatch -> {Topic2, maps:put(share, Group, Options)};
_ -> error({invalid_topic, Topic})
end
end;
parse(Topic, Options) ->