mirror of https://github.com/grpc/grpc-go.git
client: update state earlier to prevent resetTransport calls from killing good transports (#2862)
This commit is contained in:
parent
a5396fd45c
commit
a1d4c283c6
|
|
@ -735,6 +735,9 @@ func (ac *addrConn) connect() error {
|
|||
ac.mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
// Update connectivity state within the lock to prevent subsequent or
|
||||
// concurrent calls from resetting the transport more than once.
|
||||
ac.updateConnectivityState(connectivity.Connecting)
|
||||
ac.mu.Unlock()
|
||||
|
||||
// Start a goroutine connecting to the server asynchronously.
|
||||
|
|
|
|||
Loading…
Reference in New Issue