Merge pull request #8428 from zhongwencool/fix-subid-undefined

fix: get subscriptions crash when subid is undefined
This commit is contained in:
zhongwencool 2022-07-13 17:08:55 +08:00 committed by GitHub
commit 5a25c8b682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ format({_Subscriber, Topic, Options = #{share := Group}}) ->
#{node => node(), topic => filename:join([<<"$share">>, Group, Topic]), clientid => maps:get(subid, Options), qos => QoS};
format({_Subscriber, Topic, Options}) ->
QoS = maps:get(qos, Options),
#{node => node(), topic => Topic, clientid => maps:get(subid, Options), qos => QoS}.
#{node => node(), topic => Topic, clientid => maps:get(subid, Options, ""), qos => QoS}.
%%--------------------------------------------------------------------
%% Query Function