فهرست منبع

fix(persistent_sessions): add back the trap_exit

Tobias Lindahl 4 سال پیش
والد
کامیت
99836b2660
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      apps/emqx/src/emqx_session_router_worker.erl

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

@@ -91,6 +91,7 @@ buffer(Worker, STopic, Msg) ->
 init(#{ remote_pid  := RemotePid
 init(#{ remote_pid  := RemotePid
       , session_id  := SessionID
       , session_id  := SessionID
       , session_tab := SessionTab}) ->
       , session_tab := SessionTab}) ->
+    process_flag(trap_exit, true),
     erlang:monitor(process, RemotePid),
     erlang:monitor(process, RemotePid),
     ?tp(ps_worker_started, #{ remote_pid => RemotePid
     ?tp(ps_worker_started, #{ remote_pid => RemotePid
                             , sid => SessionID }),
                             , sid => SessionID }),