From a98aaf26ccdd4cf04e4c417f0653d93da801f246 Mon Sep 17 00:00:00 2001 From: yuanyuyuan Date: Thu, 1 Feb 2024 16:42:48 +0800 Subject: [PATCH] Let's use ZRuntime::Reception to handle accept_task --- io/zenoh-links/zenoh-link-quic/src/unicast.rs | 2 +- io/zenoh-links/zenoh-link-udp/src/unicast.rs | 3 +-- io/zenoh-links/zenoh-link-unixsock_stream/src/unicast.rs | 2 +- io/zenoh-links/zenoh-link-ws/src/unicast.rs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/io/zenoh-links/zenoh-link-quic/src/unicast.rs b/io/zenoh-links/zenoh-link-quic/src/unicast.rs index 100a0b1beb..31b32d37da 100644 --- a/io/zenoh-links/zenoh-link-quic/src/unicast.rs +++ b/io/zenoh-links/zenoh-link-quic/src/unicast.rs @@ -435,7 +435,7 @@ impl LinkManagerUnicastTrait for LinkManagerUnicastQuic { zasyncwrite!(c_listeners).remove(&c_addr); res }; - tracker.spawn_on(task, &zenoh_runtime::ZRuntime::TX); + tracker.spawn_on(task, &zenoh_runtime::ZRuntime::Reception); // Initialize the QuicAcceptor let locator = endpoint.to_locator(); diff --git a/io/zenoh-links/zenoh-link-udp/src/unicast.rs b/io/zenoh-links/zenoh-link-udp/src/unicast.rs index de91494066..f959936cf7 100644 --- a/io/zenoh-links/zenoh-link-udp/src/unicast.rs +++ b/io/zenoh-links/zenoh-link-udp/src/unicast.rs @@ -414,7 +414,7 @@ impl LinkManagerUnicastTrait for LinkManagerUnicastUdp { zasyncwrite!(c_listeners).remove(&c_addr); res }; - tracker.spawn_on(task, &zenoh_runtime::ZRuntime::TX); + tracker.spawn_on(task, &zenoh_runtime::ZRuntime::Reception); let locator = endpoint.to_locator(); let listener = ListenerUnicastUdp::new(endpoint, token, tracker); @@ -612,7 +612,6 @@ async fn accept_read_task( // tool. In case of systemd-based systems, this can be changed by using the // "sysctl" command line tool. tokio::time::sleep(Duration::from_micros(*UDP_ACCEPT_THROTTLE_TIME)).await; - continue; } } } diff --git a/io/zenoh-links/zenoh-link-unixsock_stream/src/unicast.rs b/io/zenoh-links/zenoh-link-unixsock_stream/src/unicast.rs index 68fc92537a..eed62a38b6 100644 --- a/io/zenoh-links/zenoh-link-unixsock_stream/src/unicast.rs +++ b/io/zenoh-links/zenoh-link-unixsock_stream/src/unicast.rs @@ -386,7 +386,7 @@ impl LinkManagerUnicastTrait for LinkManagerUnicastUnixSocketStream { zasyncwrite!(c_listeners).remove(&c_path); res }; - tracker.spawn_on(task, &zenoh_runtime::ZRuntime::TX); + tracker.spawn_on(task, &zenoh_runtime::ZRuntime::Reception); let locator = endpoint.to_locator(); let listener = ListenerUnixSocketStream::new(endpoint, token, tracker, lock_fd); diff --git a/io/zenoh-links/zenoh-link-ws/src/unicast.rs b/io/zenoh-links/zenoh-link-ws/src/unicast.rs index f2d3c31641..44232ec346 100644 --- a/io/zenoh-links/zenoh-link-ws/src/unicast.rs +++ b/io/zenoh-links/zenoh-link-ws/src/unicast.rs @@ -363,7 +363,7 @@ impl LinkManagerUnicastTrait for LinkManagerUnicastWs { zasyncwrite!(c_listeners).remove(&c_addr); res }; - tracker.spawn_on(task, &zenoh_runtime::ZRuntime::TX); + tracker.spawn_on(task, &zenoh_runtime::ZRuntime::Reception); let locator = endpoint.to_locator(); let listener = ListenerUnicastWs::new(endpoint, token, tracker);