fix: handle internal timeout errors in client Mqueue/Inflight APIs
This commit is contained in:
parent
f5a820cb10
commit
42af1f9d63
|
@ -713,5 +713,17 @@ call_conn(ConnMod, Pid, Req) ->
|
||||||
exit:{R, _} when R =:= shutdown; R =:= noproc ->
|
exit:{R, _} when R =:= shutdown; R =:= noproc ->
|
||||||
{error, shutdown};
|
{error, shutdown};
|
||||||
exit:{{shutdown, _OOMInfo}, _Location} ->
|
exit:{{shutdown, _OOMInfo}, _Location} ->
|
||||||
{error, shutdown}
|
{error, shutdown};
|
||||||
|
exit:timeout ->
|
||||||
|
?SLOG(
|
||||||
|
warning,
|
||||||
|
#{
|
||||||
|
msg => "call_client_connection_process_timeout",
|
||||||
|
request => Req,
|
||||||
|
pid => Pid,
|
||||||
|
module => ConnMod,
|
||||||
|
stacktrace => erlang:process_info(Pid, current_stacktrace)
|
||||||
|
}
|
||||||
|
),
|
||||||
|
{error, timeout}
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -1232,6 +1232,8 @@ list_client_msgs(MsgType, ClientID, QString) ->
|
||||||
code => 'NOT_IMPLEMENTED',
|
code => 'NOT_IMPLEMENTED',
|
||||||
message => <<"API not implemented for persistent sessions">>
|
message => <<"API not implemented for persistent sessions">>
|
||||||
}};
|
}};
|
||||||
|
{error, Reason} ->
|
||||||
|
?INTERNAL_ERROR(Reason);
|
||||||
{Msgs, Meta = #{}} when is_list(Msgs) ->
|
{Msgs, Meta = #{}} when is_list(Msgs) ->
|
||||||
format_msgs_resp(MsgType, Msgs, Meta, QString)
|
format_msgs_resp(MsgType, Msgs, Meta, QString)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue