code: func (v *priorityClientPool) unregisterPeer(p *peer) {
  	v.lock.Lock()
  	defer v.lock.Unlock()
  
  	id := p.ID()
  	c := v.clients[id]
  	if !c.connected {
  		return
  	}
  	if c.cap != 0 {
  		c.connected = false
  		v.clients[id] = c
  		v.priorityCount--
  		v.totalConnectedCap -= c.cap
  		if v.child != nil {
  			v.child.setLimits(v.maxPeers-v.priorityCount, v.totalCap-v.totalConnectedCap)
  		}
  	} else {
  		if v.child != nil {
  			v.child.unregisterPeer(p)
  		}
  		delete(v.clients, id)
  	}
  }
docs: // unregisterPeer is called when a client is disconnected. If the client has no
  // priority assigned then it is also removed from the child pool.