Skip to content

Commit 9436c70

Browse files
author
Emile Joubert
committed
Ensure missed heartbeat is reported when connection shuts down
1 parent 4daf62e commit 9436c70

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

projects/client/RabbitMQ.Client/src/client/impl/ConnectionBase.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,10 @@ public void HeartbeatReadLoop()
550550
// Has to miss two full heartbeats to force socket close
551551
if (m_missedHeartbeats > 1)
552552
{
553-
EndOfStreamException eose = new EndOfStreamException(
554-
"Heartbeat missing with heartbeat == " +
555-
m_heartbeat + " seconds");
553+
String description = "Heartbeat missing with heartbeat == " +
554+
m_heartbeat + " seconds";
555+
EndOfStreamException eose = new EndOfStreamException(description);
556+
m_shutdownReport.Add(new ShutdownReportEntry(description, eose));
556557
HandleMainLoopException(new ShutdownEventArgs(
557558
ShutdownInitiator.Library,
558559
0,

0 commit comments

Comments
 (0)