fix(emqx_mgmt): catch OOM shutdown exits properly when calling a client conn process

The exit reason is expected to include gen_server `Location`:
  `{{shutdown, OOMInfo}, Location}`.
This commit is contained in:
Serge Tupchii 2024-03-29 13:09:08 +02:00
parent 2e528d1dd8
commit f5a820cb10
1 changed files with 2 additions and 0 deletions

View File

@ -711,5 +711,7 @@ call_conn(ConnMod, Pid, Req) ->
exit:R when R =:= shutdown; R =:= normal -> exit:R when R =:= shutdown; R =:= normal ->
{error, shutdown}; {error, shutdown};
exit:{R, _} when R =:= shutdown; R =:= noproc -> exit:{R, _} when R =:= shutdown; R =:= noproc ->
{error, shutdown};
exit:{{shutdown, _OOMInfo}, _Location} ->
{error, shutdown} {error, shutdown}
end. end.