fix(emqx_mgmt): do not attempt to get a stacktrace of a remote client connection process

This commit is contained in:
Serge Tupchii 2024-04-01 16:42:12 +03:00
parent dd6f65f7dd
commit ceb04ba06d
1 changed files with 15 additions and 10 deletions

View File

@ -715,15 +715,20 @@ call_conn(ConnMod, Pid, Req) ->
exit:{{shutdown, _OOMInfo}, _Location} -> exit:{{shutdown, _OOMInfo}, _Location} ->
{error, shutdown}; {error, shutdown};
exit:timeout -> exit:timeout ->
?SLOG( LogData = #{
warning, msg => "call_client_connection_process_timeout",
#{ request => Req,
msg => "call_client_connection_process_timeout", pid => Pid,
request => Req, module => ConnMod
pid => Pid, },
module => ConnMod, LogData1 =
stacktrace => erlang:process_info(Pid, current_stacktrace) case node(Pid) =:= node() of
} true ->
), LogData#{stacktrace => erlang:process_info(Pid, current_stacktrace)};
false ->
LogData
end,
?SLOG(warning, LogData1),
{error, timeout} {error, timeout}
end. end.