code: func (pm *ProtocolManager) runPeer(version uint, p *p2p.Peer, rw p2p.MsgReadWriter) error {
  	var entry *poolEntry
  	peer := pm.newPeer(int(version), pm.networkId, p, rw)
  	if pm.serverPool != nil {
  		entry = pm.serverPool.connect(peer, peer.Node())
  	}
  	peer.poolEntry = entry
  	select {
  	case pm.newPeerCh <- peer:
  		pm.wg.Add(1)
  		defer pm.wg.Done()
  		err := pm.handle(peer)
  		if entry != nil {
  			pm.serverPool.disconnect(entry)
  		}
  		return err
  	case <-pm.quitSync:
  		if entry != nil {
  			pm.serverPool.disconnect(entry)
  		}
  		return p2p.DiscQuitting
  	}
  }
docs: // runPeer is the p2p protocol run function for the given version.