code: func (v *priorityClientPool) setLimitsNow(count int, totalCap uint64) {
  	if v.priorityCount > count || v.totalConnectedCap > totalCap {
  		for id, c := range v.clients {
  			if c.connected {
  				c.connected = false
  				v.totalConnectedCap -= c.cap
  				v.priorityCount--
  				v.clients[id] = c
  				go v.ps.Unregister(c.peer.id)
  				if v.priorityCount <= count && v.totalConnectedCap <= totalCap {
  					break
  				}
  			}
  		}
  	}
  	v.maxPeers = count
  	v.totalCap = totalCap
  	if v.child != nil {
  		v.child.setLimits(v.maxPeers-v.priorityCount, v.totalCap-v.totalConnectedCap)
  	}
  }
docs: // setLimits updates the allowed peer count and total capacity immediately