Skip to content

Commit 657c4f8

Browse files
committed
fix: use "FailedOpen" reason text when closing AutorecoveringConnection after inner connection open error
This matches the behavior used when normal connection opening fails.
1 parent f95fcd0 commit 657c4f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/RabbitMQ.Client/Impl/AutorecoveringConnection.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ await innerConnection.OpenAsync(cancellationToken)
105105
{
106106
try
107107
{
108-
await connection.CloseAsync(cancellationToken)
109-
.ConfigureAwait(false);
108+
await connection.CloseAsync(Constants.InternalError, "FailedOpen",
109+
InternalConstants.DefaultConnectionCloseTimeout, true,
110+
cancellationToken).ConfigureAwait(false);
110111
await connection.DisposeAsync()
111112
.ConfigureAwait(false);
112113
}

0 commit comments

Comments
 (0)