Subscriber down clear emqx_suboption table

This commit is contained in:
turtled 2018-12-08 10:26:50 +08:00
parent 5e53eaeee5
commit ba897e51f9
1 changed files with 2 additions and 1 deletions

View File

@ -272,7 +272,8 @@ subscriber_down(SubPid) ->
I -> true = ets:delete_object(?SUBSCRIBER, {Topic, {shared, I}}), I -> true = ets:delete_object(?SUBSCRIBER, {Topic, {shared, I}}),
true = ets:delete_object(?SUBSCRIBER, {{shared, Topic, I}, SubPid}), true = ets:delete_object(?SUBSCRIBER, {{shared, Topic, I}, SubPid}),
ok = cast(pick({Topic, I}), {unsubscribed, Topic, I}) ok = cast(pick({Topic, I}), {unsubscribed, Topic, I})
end; end,
ets:delete(?SUBOPTION, Sub);
[] -> ok [] -> ok
end end
end, ets:lookup(?SUBSCRIPTION, SubPid)), end, ets:lookup(?SUBSCRIPTION, SubPid)),