We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 025ad75 commit 16d302fCopy full SHA for 16d302f
request/pool.go
@@ -9,6 +9,7 @@ package request
9
import (
10
"context"
11
"fmt"
12
+ "math/rand"
13
"sync"
14
"sync/atomic"
15
"time"
@@ -101,7 +102,7 @@ func (rp *Pool) createPendingStore() *PendingStore {
101
102
OnDelete: func(key string) {
103
rp.semaphore.Release(1)
104
},
- Epoch: rp.options.FirstStrikeThreshold / 10,
105
+ Epoch: time.Duration(rand.Intn(50))*time.Millisecond + rp.options.FirstStrikeThreshold/10,
106
FirstStrikeCallback: rp.striker.OnFirstStrikeTimeout,
107
SecondStrikeCallback: rp.striker.OnSecondStrikeTimeout,
108
}
0 commit comments