fix(shared_sub): insert alive pid table at mnesia table event

This commit is contained in:
Zaiming (Stone) Shi 2022-12-19 20:12:38 +01:00
parent 4f1fb0b629
commit ad3a793910
1 changed files with 1 additions and 0 deletions

View File

@ -446,6 +446,7 @@ handle_info(
{mnesia_table_event, {write, #emqx_shared_subscription{subpid = SubPid}, _}}, {mnesia_table_event, {write, #emqx_shared_subscription{subpid = SubPid}, _}},
State = #state{pmon = PMon} State = #state{pmon = PMon}
) -> ) ->
ok = maybe_insert_alive_tab(SubPid),
{noreply, update_stats(State#state{pmon = emqx_pmon:monitor(SubPid, PMon)})}; {noreply, update_stats(State#state{pmon = emqx_pmon:monitor(SubPid, PMon)})};
%% The subscriber may have subscribed multiple topics, so we need to keep monitoring the PID until %% The subscriber may have subscribed multiple topics, so we need to keep monitoring the PID until
%% it `unsubscribed` the last topic. %% it `unsubscribed` the last topic.