binary
This commit is contained in:
parent
d3ee464789
commit
7cd5367f3b
|
@ -150,7 +150,7 @@ create(topic, Topic) when is_binary(Topic) ->
|
||||||
{aborted, Error} -> {error, Error}
|
{aborted, Error} -> {error, Error}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
create(subscription, {SubId, Topic, Qos}) ->
|
create(subscription, {SubId, Topic, Qos}) when is_binary(SubId) andalso is_binary(Topic) ->
|
||||||
case mnesia:transaction(fun add_subscription/2, [SubId, {Topic, Qos}]) of
|
case mnesia:transaction(fun add_subscription/2, [SubId, {Topic, Qos}]) of
|
||||||
{atomic, ok} -> ok;
|
{atomic, ok} -> ok;
|
||||||
{aborted, Error} -> {error, Error}
|
{aborted, Error} -> {error, Error}
|
||||||
|
|
Loading…
Reference in New Issue