code: func (cm *ConnManager) NewConnReq() {
  	if atomic.LoadInt32(&cm.stop) != 0 {
  		return
  	}
  	if cm.cfg.GetNewAddress == nil {
  		return
  	}
  
  	c := &ConnReq{}
  	atomic.StoreUint64(&c.id, atomic.AddUint64(&cm.connReqCount, 1))
  
  	// Submit a request of a pending connection attempt to the connection
  	// manager. By registering the id before the connection is even
  	// established, we'll be able to later cancel the connection via the
  	// Remove method.
  	done := make(chan struct{})
  	select {
  	case cm.requests <- registerPending{c, done}:
  	case <-cm.quit:
  		return
  	}
  
  	// Wait for the registration to successfully add the pending conn req to
  	// the conn manager's internal state.
  	select {
  	case <-done:
  	case <-cm.quit:
  		return
  	}
  
  	addr, err := cm.cfg.GetNewAddress()
  	if err != nil {
  		select {
  		case cm.requests <- handleFailed{c, err}:
  		case <-cm.quit:
  		}
  		return
  	}
  
  	c.Addr = addr
  
  	cm.Connect(c)
  }
docs: // NewConnReq creates a new connection request and connects to the
  // corresponding address.