Skip to content

Commit 502d27d

Browse files
authored
Rename ClosedReason heartbeats missing string (#395)
Signed-off-by: Gabriele Santomaggio <[email protected]>
1 parent 3ed2978 commit 502d27d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

RabbitMQ.Stream.Client/Connection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal static class ConnectionClosedReason
1818
{
1919
public const string Normal = "TCP connection closed normal";
2020
public const string Unexpected = "TCP connection closed unexpected";
21-
public const string MissingHeartbeat = "TCP connection closed missing heartbeat";
21+
public const string TooManyHeartbeatsMissing = "TCP connection closed by too many heartbeats missing";
2222

2323
}
2424

RabbitMQ.Stream.Client/HeartBeatHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private async Task PerformHeartBeatAsync()
8383
// Even it is not a perfect solution, it is a good way to handle the case to avoid to introduce breaking changes
8484
// we need to review all the status and the close reason on the version 2.0
8585
await _close($"Too many heartbeats missed: {_missedHeartbeat}. Client connection will be closed.",
86-
ConnectionClosedReason.MissingHeartbeat).ConfigureAwait(false);
86+
ConnectionClosedReason.TooManyHeartbeatsMissing).ConfigureAwait(false);
8787
}
8888

8989
internal void UpdateHeartBeat()

RabbitMQ.Stream.Client/Reliable/ReliableBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected static ChangeStatusReason FromConnectionClosedReasonToStatusReason(str
122122
// Can be removed on the version 2.0 when the ConnectionClosedReason will be an enum as well
123123
return connectionClosedReason switch
124124
{
125-
ConnectionClosedReason.MissingHeartbeat => ChangeStatusReason.DisconnectedByTooManyHeartbeatMissing,
125+
ConnectionClosedReason.TooManyHeartbeatsMissing => ChangeStatusReason.DisconnectedByTooManyHeartbeatMissing,
126126
ConnectionClosedReason.Unexpected => ChangeStatusReason.UnexpectedlyDisconnected,
127127
_ => throw new ArgumentOutOfRangeException(nameof(connectionClosedReason), connectionClosedReason, null)
128128
};

0 commit comments

Comments
 (0)