Closed amelkikh closed 3 years ago
Is it possible to replace the ErrBadConnection connection error with the ConnectTimeout option? To make the client wait for reconnection to Nats on initial connection?
No, this would not make the STAN client automatically issue the connect (which is a request/reply with the STAN server) when the NATS connection is ready. Since you provide the NATS connection, then you could chose to set a reconnect handler and then issue the STAN connect (at least for the very first connect, which you need to distinguish from a later disconnect followed by a reconnect).
Hi! In version 1.11 of Nats the
RetryOnFailedConnect
option appeared. This allows to get a connection to the Nats with statusRECONNECTING
despite the unavailability of the connection at the time of connection. This creates some problem for the initialization of the Stan. Is it possible to replace theErrBadConnection
connection error with theConnectTimeout
option? To make the client wait for reconnection to Nats on initial connection?Thanks!