diff --git a/zenoh-ext/src/advanced_subscriber.rs b/zenoh-ext/src/advanced_subscriber.rs index eaad4429d3..ae7f9312e6 100644 --- a/zenoh-ext/src/advanced_subscriber.rs +++ b/zenoh-ext/src/advanced_subscriber.rs @@ -357,7 +357,7 @@ impl Wait for AdvancedSubscriberBuilder<'_, '_, '_, Callback, true> { fn wait(self) -> ::To { let mut sub = AdvancedSubscriber::new(self.with_static_keys())?; sub.subscriber.set_background(true); - if let Some(liveliness_sub) = sub.liveliness_subscriber.take() { + if let Some(mut liveliness_sub) = sub.liveliness_subscriber.take() { liveliness_sub.set_background(true); } Ok(())