From 1c26ed35081e987c3c7d5783140dae8b9070bf91 Mon Sep 17 00:00:00 2001 From: ptsteward Date: Sun, 11 Jan 2026 00:24:17 -0700 Subject: [PATCH] resolves: 1035 - Use ConnectTimeout when awaiting INFO signal --- src/NATS.Client.Core/NatsConnection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NATS.Client.Core/NatsConnection.cs b/src/NATS.Client.Core/NatsConnection.cs index 5201fae0f..0c4d8584c 100644 --- a/src/NATS.Client.Core/NatsConnection.cs +++ b/src/NATS.Client.Core/NatsConnection.cs @@ -526,7 +526,7 @@ private async ValueTask SetupReaderWriterAsync(bool reconnect) { // Wait for an INFO message from server. If we land on a dead socket and server response // can't be received, this will throw a timeout exception and we will retry the connection. - await waitForInfoSignal.Task.WaitAsync(Opts.RequestTimeout).ConfigureAwait(false); + await waitForInfoSignal.Task.WaitAsync(Opts.ConnectTimeout).ConfigureAwait(false); // check to see if we should upgrade to TLS if (_socketConnection!.InnerSocket is INatsTlsUpgradeableSocketConnection tlsUpgradeableSocket)