Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iambriccardo committed Sep 17, 2024
1 parent dd1ab83 commit 58c6af4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions relay-server/src/services/buffer/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Types for buffering envelopes.

use std::error::Error;
use std::future;
use std::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering;
use std::sync::Arc;
Expand Down Expand Up @@ -175,8 +174,8 @@ impl EnvelopeBufferService {

// In case the project cache is not ready, we defer popping to first try and handle incoming
// messages and only come back to this in case within the timeout no data was received.
if !self.project_cache_ready.load(Ordering::Relaxed) {
tokio::time::sleep(DEFAULT_SLEEP).await;
while !self.project_cache_ready.load(Ordering::Relaxed) {
tokio::time::sleep(Duration::ZERO).await;
}

relay_statsd::metric!(
Expand Down

0 comments on commit 58c6af4

Please sign in to comment.