Skip to content

Commit 7573415

Browse files
fix
1 parent 58c5724 commit 7573415

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/djls-ipc/src/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl Connection {
5050
path: &Path,
5151
config: ConnectionConfig,
5252
) -> Result<Box<dyn ConnectionTrait>> {
53-
let mut current_delay = config.initial_delay_ms;
53+
let mut current_delay = u64::from(config.initial_delay_ms);
5454
let mut last_error = None;
5555

5656
for attempt in 0..config.max_retries {
@@ -69,8 +69,8 @@ impl Connection {
6969
if attempt < config.max_retries - 1 {
7070
tokio::time::sleep(Duration::from_millis(current_delay)).await;
7171

72-
current_delay = ((current_delay as f64 * config.backoff_factor) as u64)
73-
.min(config.max_delay_ms);
72+
current_delay = ((current_delay as f32 * config.backoff_factor) as u64)
73+
.min(u64::from(config.max_delay_ms));
7474
}
7575
}
7676
}

0 commit comments

Comments
 (0)