fix: get subscriptions crash when subid is undefined

This commit is contained in:
zhongwencool 2022-07-06 17:12:11 +08:00
parent ad7c2456e6
commit 5a9638b09b
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