flip min_duration and max_duration
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
1595037427
commit
5e8ae971f1
1 changed files with 2 additions and 2 deletions
|
@ -409,8 +409,8 @@ impl Service {
|
||||||
.and_modify(|e| match e {
|
.and_modify(|e| match e {
|
||||||
TransactionStatus::Failed(tries, time) => {
|
TransactionStatus::Failed(tries, time) => {
|
||||||
// Fail if a request has failed recently (exponential backoff)
|
// Fail if a request has failed recently (exponential backoff)
|
||||||
let min_duration = Duration::from_secs(services().globals.config.sender_retry_backoff_limit);
|
let min_duration = Duration::from_secs(services().globals.config.sender_timeout);
|
||||||
let max_duration = Duration::from_secs(services().globals.config.sender_timeout);
|
let max_duration = Duration::from_secs(services().globals.config.sender_retry_backoff_limit);
|
||||||
let min_elapsed_duration = min_duration * (*tries) * (*tries);
|
let min_elapsed_duration = min_duration * (*tries) * (*tries);
|
||||||
let min_elapsed_duration = cmp::min(min_elapsed_duration, max_duration);
|
let min_elapsed_duration = cmp::min(min_elapsed_duration, max_duration);
|
||||||
if time.elapsed() < min_elapsed_duration {
|
if time.elapsed() < min_elapsed_duration {
|
||||||
|
|
Loading…
Add table
Reference in a new issue