From 8ec5e913daa48e3c2d273eb35e73144dc3b9ddf2 Mon Sep 17 00:00:00 2001 From: Matthew Pendrey Date: Mon, 25 Mar 2024 12:28:42 +0000 Subject: [PATCH] move the failure to connect message until after shutdown state check --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index 5059002..16c9fa4 100644 --- a/client.go +++ b/client.go @@ -555,13 +555,13 @@ func (ac *addrConn) resetTransport() { ac.mu.Unlock() if err != nil { - ac.dopts.logger.Errorf("failed to connect to server at %s, got: %v", addr, err) // After connection failure, the addrConn enters TRANSIENT_FAILURE. ac.mu.Lock() if ac.state == connectivity.Shutdown { ac.mu.Unlock() return } + ac.dopts.logger.Errorf("failed to connect to server at %s, got: %v", addr, err) ac.updateConnectivityState(connectivity.TransientFailure) ac.mu.Unlock()