Skip to content

Commit

Permalink
fix: loosen the condition
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan committed Apr 30, 2024
1 parent 13b2db1 commit dfcac87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions zenoh/tests/interceptors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ fn downsampling_by_keyexpr_impl(flow: InterceptorFlow) {
let rate_check = move |ke: KeyExpr, rate: usize| -> bool {
tracing::info!("keyexpr: {ke}, rate: {rate}");
if ke == ke_10hz {
rate > 0 && rate <= 10
rate > 0 && rate <= 10 + 1
} else if ke == ke_20hz {
rate > 0 && rate <= 20
rate > 0 && rate <= 20 + 1
} else {
tracing::error!("Shouldn't reach this case. Invalid keyexpr {ke} detected.");
false
Expand Down Expand Up @@ -212,7 +212,7 @@ fn downsampling_by_interface_impl(flow: InterceptorFlow) {
let rate_check = move |ke: KeyExpr, rate: usize| -> bool {
tracing::info!("keyexpr: {ke}, rate: {rate}");
if ke == ke_10hz {
rate > 0 && rate <= 10
rate > 0 && rate <= 10 + 1
} else if ke == ke_no_effect {
rate > 10
} else {
Expand Down

0 comments on commit dfcac87

Please sign in to comment.