Skip to content

Commit

Permalink
fix possible possible panic
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed Feb 21, 2024
1 parent 3462330 commit 8422a4f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions send-transaction-service/src/send_transaction_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,11 +565,14 @@ impl SendTransactionService {
stats_report.report();

retry_interval_ms = retry_interval_ms_default
- result
.last_sent_time
.and_then(|last| Instant::now().checked_duration_since(last))
.and_then(|interval| interval.as_millis().try_into().ok())
.unwrap_or(0);
.checked_sub(
result
.last_sent_time
.and_then(|last| Instant::now().checked_duration_since(last))
.and_then(|interval| interval.as_millis().try_into().ok())
.unwrap_or(0),
)
.unwrap_or(retry_interval_ms_default);
}
})
.unwrap()
Expand Down

0 comments on commit 8422a4f

Please sign in to comment.