Skip to content

Commit b2b1f86

Browse files
georgeh0Copilot
andauthored
Update src/utils/retryable.rs
Co-authored-by: Copilot <[email protected]>
1 parent edb3921 commit b2b1f86

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils/retryable.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ pub async fn run<
129129
return Result::Err(err);
130130
}
131131
let remaining_time = deadline.saturating_duration_since(now);
132-
if remaining_time < sleep_duration {
133-
sleep_duration = remaining_time;
134-
}
132+
sleep_duration = std::cmp::min(sleep_duration, remaining_time);
135133
}
136134
trace!(
137135
"Will retry in {}ms for error: {}",

0 commit comments

Comments
 (0)