Skip to content

Commit

Permalink
fix(search): 🐛 correct random delay condition in search
Browse files Browse the repository at this point in the history
  • Loading branch information
KekmaTime committed Oct 6, 2024
1 parent 959d0c5 commit 7123e04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/routes/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub async fn search(
let next_page = page + 1;

// Add a random delay before making the request.
if config.aggregator.random_delay || !config.debug {
if config.aggregator.random_delay || config.debug {
let nanos = SystemTime::now().duration_since(UNIX_EPOCH)?.subsec_nanos() as f32;
let delay = ((nanos / 1_0000_0000 as f32).floor() as u64) + 1;
tokio::time::sleep(Duration::from_secs(delay)).await;
Expand Down

0 comments on commit 7123e04

Please sign in to comment.