removeAddrConn removes the addrConn in the subConn from clientConn. It also tears down the ac with the given error.
(ac *addrConn, err error)
| 937 | // removeAddrConn removes the addrConn in the subConn from clientConn. |
| 938 | // It also tears down the ac with the given error. |
| 939 | func (cc *ClientConn) removeAddrConn(ac *addrConn, err error) { |
| 940 | cc.mu.Lock() |
| 941 | if cc.conns == nil { |
| 942 | cc.mu.Unlock() |
| 943 | return |
| 944 | } |
| 945 | delete(cc.conns, ac) |
| 946 | cc.mu.Unlock() |
| 947 | ac.tearDown(err) |
| 948 | } |
| 949 | |
| 950 | // Target returns the target string of the ClientConn. |
| 951 | func (cc *ClientConn) Target() string { |