MCPcopy
hub / github.com/grpc/grpc-go / removeAddrConn

Method removeAddrConn

clientconn.go:939–948  ·  view source on GitHub ↗

removeAddrConn removes the addrConn in the subConn from clientConn. It also tears down the ac with the given error.

(ac *addrConn, err error)

Source from the content-addressed store, hash-verified

937// removeAddrConn removes the addrConn in the subConn from clientConn.
938// It also tears down the ac with the given error.
939func (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.
951func (cc *ClientConn) Target() string {

Callers 1

ShutdownMethod · 0.80

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45
tearDownMethod · 0.45

Tested by

no test coverage detected