mirror of https://github.com/grpc/grpc-go.git
some touchups
This commit is contained in:
parent
27f752eee6
commit
31ef3ef957
|
|
@ -325,13 +325,13 @@ func (cc *ClientConn) watchAddrUpdates() error {
|
||||||
for _, update := range updates {
|
for _, update := range updates {
|
||||||
switch update.Op {
|
switch update.Op {
|
||||||
case naming.Add:
|
case naming.Add:
|
||||||
cc.mu.Lock()
|
cc.mu.RLock()
|
||||||
addr := Address{
|
addr := Address{
|
||||||
Addr: update.Addr,
|
Addr: update.Addr,
|
||||||
Metadata: update.Metadata,
|
Metadata: update.Metadata,
|
||||||
}
|
}
|
||||||
if _, ok := cc.conns[addr]; ok {
|
if _, ok := cc.conns[addr]; ok {
|
||||||
cc.mu.Unlock()
|
cc.mu.RUnlock()
|
||||||
grpclog.Println("grpc: The name resolver wanted to add an existing address: ", addr)
|
grpclog.Println("grpc: The name resolver wanted to add an existing address: ", addr)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
@ -539,12 +539,6 @@ func (ac *addrConn) resetTransport(closeTransport bool) error {
|
||||||
ac.mu.Unlock()
|
ac.mu.Unlock()
|
||||||
return errConnClosing
|
return errConnClosing
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if ac.drain {
|
|
||||||
ac.mu.Unlock()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if ac.down != nil {
|
if ac.down != nil {
|
||||||
ac.down(ErrNetworkIO)
|
ac.down(ErrNetworkIO)
|
||||||
ac.down = nil
|
ac.down = nil
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue