From 53e876aef61bb5a0aee9a8022b3c716a73c92a05 Mon Sep 17 00:00:00 2001 From: Scott Fauerbach Date: Tue, 16 Jan 2024 16:01:05 -0500 Subject: [PATCH] Reconnect on connect, set state (#854) --- src/NATS.Client/Connection.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NATS.Client/Connection.cs b/src/NATS.Client/Connection.cs index 2a306bc8..8eda1de1 100644 --- a/src/NATS.Client/Connection.cs +++ b/src/NATS.Client/Connection.cs @@ -1250,6 +1250,7 @@ internal void connect(bool reconnectOnConnect) { if (reconnectOnConnect) { + status = ConnState.DISCONNECTED; // comes in as CLOSED, but reconnect doesn't work when closed doReconnect(); } else