Skip to content

Commit

Permalink
Merge pull request #58 from smartcontractkit/bugfix/BCF-3112-log-panic
Browse files Browse the repository at this point in the history
move the failure to connect message until after shutdown state check
  • Loading branch information
cedric-cordenier authored Mar 25, 2024
2 parents f56acb0 + 8ec5e91 commit 6b0ade1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 6b0ade1

Please sign in to comment.