les: rework clientpool (#20077)

* les: rework clientpool
This commit is contained in:
gary rong
2019-11-02 20:02:35 +08:00
committed by Felföldi Zsolt
parent 44b74cfc40
commit 0ce5e113be
9 changed files with 976 additions and 268 deletions

View File

@@ -67,7 +67,7 @@ type balanceCallback struct {
// init initializes balanceTracker
func (bt *balanceTracker) init(clock mclock.Clock, capacity uint64) {
bt.clock = clock
bt.initTime = clock.Now()
bt.initTime, bt.lastUpdate = clock.Now(), clock.Now() // Init timestamps
for i := range bt.callbackIndex {
bt.callbackIndex[i] = -1
}