From d0b72bb57f3d0ce96aa561638f9b9eb63381aad3 Mon Sep 17 00:00:00 2001 From: Luca Cominardi Date: Wed, 16 Oct 2024 15:54:35 +0200 Subject: [PATCH] Fix backoff priority --- io/zenoh-transport/src/common/pipeline.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/io/zenoh-transport/src/common/pipeline.rs b/io/zenoh-transport/src/common/pipeline.rs index a89b89bd9..0acf86ec6 100644 --- a/io/zenoh-transport/src/common/pipeline.rs +++ b/io/zenoh-transport/src/common/pipeline.rs @@ -460,6 +460,7 @@ impl StageOutIn { #[inline] fn try_pull(&mut self) -> Pull { if let Some(batch) = self.s_out_r.pull() { + self.backoff.atomic.active.store(false, Ordering::Relaxed); return Pull::Some(batch); } @@ -746,9 +747,8 @@ impl TransmissionPipelineConsumer { return Some((batch, prio)); } Pull::Backoff(deadline) => { - if deadline < backoff { - backoff = deadline; - } + backoff = deadline; + break; } Pull::None => {} }