mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-07-16 00:45:00 +00:00
fix
This commit is contained in:
parent
58c5724392
commit
7573415597
1 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,7 @@ impl Connection {
|
|||
path: &Path,
|
||||
config: ConnectionConfig,
|
||||
) -> Result<Box<dyn ConnectionTrait>> {
|
||||
let mut current_delay = config.initial_delay_ms;
|
||||
let mut current_delay = u64::from(config.initial_delay_ms);
|
||||
let mut last_error = None;
|
||||
|
||||
for attempt in 0..config.max_retries {
|
||||
|
@ -69,8 +69,8 @@ impl Connection {
|
|||
if attempt < config.max_retries - 1 {
|
||||
tokio::time::sleep(Duration::from_millis(current_delay)).await;
|
||||
|
||||
current_delay = ((current_delay as f64 * config.backoff_factor) as u64)
|
||||
.min(config.max_delay_ms);
|
||||
current_delay = ((current_delay as f32 * config.backoff_factor) as u64)
|
||||
.min(u64::from(config.max_delay_ms));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue