code: func (v *priorityClientPool) checkUpdate(id uint64) {
  	v.lock.Lock()
  	defer v.lock.Unlock()
  
  	if len(v.updateSchedule) == 0 || v.updateSchedule[0].id != id {
  		return
  	}
  	v.setLimitsNow(v.maxPeers, v.updateSchedule[0].totalCap)
  	v.updateSchedule = v.updateSchedule[1:]
  	if len(v.updateSchedule) != 0 {
  		v.scheduleCounter++
  		id := v.scheduleCounter
  		v.updateSchedule[0].id = id
  		dt := time.Duration(v.updateSchedule[0].time - mclock.Now())
  		time.AfterFunc(dt, func() { v.checkUpdate(id) })
  	}
  }
docs: // checkUpdate performs the next scheduled update if possible and schedules
  // the one after that