Skip to content

Commit

Permalink
fix(buffer): Skip sleep if duration is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbayer committed Sep 12, 2024
1 parent bb90d30 commit 5540e3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion relay-server/src/services/buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ impl EnvelopeBufferService {
buffer: &mut PolymorphicEnvelopeBuffer,
) -> Result<(), SendError> {
self.system_ready(buffer).await;
tokio::time::sleep(self.sleep).await;
if self.sleep > Duration::ZERO {
tokio::time::sleep(self.sleep).await;
}
if let Some(project_cache_ready) = self.project_cache_ready.as_mut() {
project_cache_ready.await?;
self.project_cache_ready = None;
Expand Down

0 comments on commit 5540e3c

Please sign in to comment.