Skip to content

Commit

Permalink
Merge pull request #6716 from rabbitmq/mergify/bp/v3.11.x/pr-6708
Browse files Browse the repository at this point in the history
Preserve heartbeat error reason (backport #6708)
  • Loading branch information
michaelklishin committed Dec 20, 2022
2 parents 8dbc7c9 + f0fe5d6 commit 4839381
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/rabbit/src/rabbit_reader.erl
Expand Up @@ -519,10 +519,10 @@ mainloop(Deb, Buf, BufLen, State = #v1{sock = Sock,
stop(tcp_healthcheck, State);
closed ->
stop(closed, State);
{other, {heartbeat_send_error, Reason}} ->
{other, {heartbeat_send_error, _}=ErrHeartbeat} ->
%% The only portable way to detect disconnect on blocked
%% connection is to wait for heartbeat send failure.
stop(Reason, State);
stop(ErrHeartbeat, State);
{error, Reason} ->
stop(Reason, State);
{other, {system, From, Request}} ->
Expand Down

0 comments on commit 4839381

Please sign in to comment.