(n uint)
| 170 | } |
| 171 | |
| 172 | func backoffDur(n uint) time.Duration { |
| 173 | if n > 33 { |
| 174 | n = 33 // cap to about 10s |
| 175 | } |
| 176 | d := rand.Int63n(1 << n) |
| 177 | return time.Duration(d) |
| 178 | } |
| 179 | |
| 180 | func timeoutBackoffDur(n uint) time.Duration { |
| 181 | const baseTimeout = 3 * time.Second |
no outgoing calls
no test coverage detected