Skip to content

Commit

Permalink
Spawn Timer in a tokio runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Dec 10, 2024
1 parent 00963f3 commit 3c6ba61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zenoh-ext/src/advanced_subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use {
std::time::Duration,
uhlc::ID,
zenoh::handlers::{locked, DefaultHandler},
zenoh::internal::zlock,
zenoh::internal::{runtime::ZRuntime, zlock},
zenoh::pubsub::Subscriber,
zenoh::query::{QueryTarget, Reply, ReplyKeyExpr},
zenoh::time::Timestamp,
Expand Down Expand Up @@ -570,6 +570,7 @@ impl<Handler> AdvancedSubscriber<Handler> {
global_pending_queries: if conf.history.is_some() { 1 } else { 0 },
session,
period: retransmission.as_ref().and_then(|r| {
let _rt = ZRuntime::Application.enter();
r.periodic_queries.map(|p| Period {
timer: Timer::new(false),
period: p,
Expand Down

0 comments on commit 3c6ba61

Please sign in to comment.