Skip to content

Commit

Permalink
fix: backoff_interval adjusted for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
aamohd committed Nov 7, 2024
1 parent 39de368 commit 86d8a96
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hipcheck/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ pub fn start_plugins(
/* max_spawn_attempts */ 3,
/* max_conn_attempts */ 5,
/* port_range */ 40000..u16::MAX,
/* backoff_interval_micros */ 1000,
/* backoff_interval_micros */ 100000,
/* jitter_percent */ 10,
)?;

Expand Down
2 changes: 1 addition & 1 deletion hipcheck/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ fn cmd_plugin(args: PluginArgs) {
/* max_spawn_attempts */ 3,
/* max_conn_attempts */ 5,
/* port_range */ 40000..u16::MAX,
/* backoff_interval_micros */ 1000,
/* backoff_interval_micros */ 100000,
/* jitter_percent */ 10,
)
.unwrap();
Expand Down
1 change: 0 additions & 1 deletion hipcheck/src/plugin/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ impl PluginExecutor {
if !(0.0..=2.0).contains(&jitter_percent) {
panic!("Math error! We should have better guardrails around PluginExecutor field values.");
}
// sleep_duration = (backoff * conn_attempts) * (1.0 +/- jitter_percent)
let sleep_duration: Duration = self
.backoff_interval
.saturating_mul(conn_attempts as u32)
Expand Down

0 comments on commit 86d8a96

Please sign in to comment.