fix(exclusive): fix xref error && change exclusive default value
This commit is contained in:
parent
85f6846f89
commit
b1b1d40528
|
@ -70,7 +70,7 @@ check_subscribe(#{clientid := ClientId}, Topic) ->
|
|||
Fun = fun() ->
|
||||
try_subscribe(ClientId, Topic)
|
||||
end,
|
||||
case mnesia:transaction(Fun) of
|
||||
case mria:transaction(?EXCLUSIVE_SHARD, Fun) of
|
||||
{atomic, Res} ->
|
||||
Res;
|
||||
{aborted, Reason} ->
|
||||
|
@ -81,7 +81,7 @@ check_subscribe(#{clientid := ClientId}, Topic) ->
|
|||
end.
|
||||
|
||||
unsubscribe(Topic, #{is_exclusive := true}) ->
|
||||
_ = mnesia:transaction(fun() -> mnesia:delete({?TAB, Topic}) end),
|
||||
_ = mria:transaction(?EXCLUSIVE_SHARD, fun() -> mnesia:delete({?TAB, Topic}) end),
|
||||
ok;
|
||||
unsubscribe(_Topic, _SubOpts) ->
|
||||
ok.
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
wildcard_subscription => true,
|
||||
subscription_identifiers => true,
|
||||
shared_subscription => true,
|
||||
exclusive_subscription => true
|
||||
exclusive_subscription => false
|
||||
}).
|
||||
|
||||
-spec check_pub(
|
||||
|
|
|
@ -443,7 +443,7 @@ fields("mqtt") ->
|
|||
sc(
|
||||
boolean(),
|
||||
#{
|
||||
default => true,
|
||||
default => false,
|
||||
desc => ?DESC(mqtt_exclusive_subscription)
|
||||
}
|
||||
)},
|
||||
|
|
Loading…
Reference in New Issue