net_transport.go
func (n *NetworkTransport) returnConn(conn *netConn) {
	n.connPoolLock.Lock()
	defer n.connPoolLock.Unlock()

	key := conn.target
	conns, _ := n.connPool[key]

	if !n.IsShutdown() && len(conns) < n.maxPool {
		n.connPool[key] = append(conns, conn)
	} else {
		conn.Release()
	}
}
func (n *NetworkTransport) returnConn(conn *netConn) {
	n.connPoolLock.Lock()
	defer n.connPoolLock.Unlock()

	key := conn.target
	conns, _ := n.connPool[key]

	if !n.IsShutdown() && len(conns) < n.maxPool {
		n.connPool[key] = append(conns, conn)
	} else {
		conn.Release()
	}
}
func ( n * NetworkTransport ) returnConn ( conn * netConn ) { n . connPoolLock . Lock ( ) defer n . connPoolLock . Unlock ( ) key := conn . target conns , _ := n . connPool [ key ] if ! n . IsShutdown ( ) && len ( conns ) < n . maxPool { n . connPool [ key ] = append ( conns , conn ) } else { conn . Release ( ) } }
// returnConn returns a connection back to the pool.
returnConn returns a connection back to the pool .