소스 검색

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

Zaiming (Stone) Shi 3 년 전
부모
커밋
ad3a793910
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      apps/emqx/src/emqx_shared_sub.erl

+ 1 - 0
apps/emqx/src/emqx_shared_sub.erl

@@ -446,6 +446,7 @@ handle_info(
     {mnesia_table_event, {write, #emqx_shared_subscription{subpid = SubPid}, _}},
     State = #state{pmon = PMon}
 ) ->
+    ok = maybe_insert_alive_tab(SubPid),
     {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
 %% it `unsubscribed` the last topic.