We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58c5724 commit 7573415Copy full SHA for 7573415
crates/djls-ipc/src/client.rs
@@ -50,7 +50,7 @@ impl Connection {
50
path: &Path,
51
config: ConnectionConfig,
52
) -> Result<Box<dyn ConnectionTrait>> {
53
- let mut current_delay = config.initial_delay_ms;
+ let mut current_delay = u64::from(config.initial_delay_ms);
54
let mut last_error = None;
55
56
for attempt in 0..config.max_retries {
@@ -69,8 +69,8 @@ impl Connection {
69
if attempt < config.max_retries - 1 {
70
tokio::time::sleep(Duration::from_millis(current_delay)).await;
71
72
- current_delay = ((current_delay as f64 * config.backoff_factor) as u64)
73
- .min(config.max_delay_ms);
+ current_delay = ((current_delay as f32 * config.backoff_factor) as u64)
+ .min(u64::from(config.max_delay_ms));
74
}
75
76
0 commit comments