mirror of https://github.com/grpc/grpc-go.git
clientconn: fix potential deadlock caused by ResetConnectBackoff (#3051)
This commit is contained in:
parent
1950dc9db9
commit
e351044388
|
@ -875,8 +875,9 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOption) {
|
|||
// This API is EXPERIMENTAL.
|
||||
func (cc *ClientConn) ResetConnectBackoff() {
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
for ac := range cc.conns {
|
||||
conns := cc.conns
|
||||
cc.mu.Unlock()
|
||||
for ac := range conns {
|
||||
ac.resetConnectBackoff()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue