From e04c8613d3c33472edcbde6fde5bd4beeb24f2bf Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 25 Mar 2024 16:56:09 +0100 Subject: [PATCH] Specify runtime for queries timeout spawn (#861) --- zenoh/src/net/routing/dispatcher/queries.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zenoh/src/net/routing/dispatcher/queries.rs b/zenoh/src/net/routing/dispatcher/queries.rs index ae22c29fd8..3105c6195f 100644 --- a/zenoh/src/net/routing/dispatcher/queries.rs +++ b/zenoh/src/net/routing/dispatcher/queries.rs @@ -599,7 +599,7 @@ pub fn route_query( face: Arc::downgrade(outface), qid: *qid, }; - tokio::task::spawn(async move { + zenoh_runtime::ZRuntime::Net.spawn(async move { tokio::time::sleep(timeout).await; cleanup.run().await }); @@ -636,7 +636,7 @@ pub fn route_query( face: Arc::downgrade(outface), qid: *qid, }; - tokio::task::spawn(async move { + zenoh_runtime::ZRuntime::Net.spawn(async move { tokio::time::sleep(timeout).await; cleanup.run().await });