Skip to content

Make sure that UDP transports remain open when UDP listener is closed #1859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

OlivierHecart
Copy link
Contributor

No description provided.

Copy link

PR missing one of the required labels: {'dependencies', 'bug', 'new feature', 'documentation', 'enhancement', 'internal', 'breaking-change'}

@OlivierHecart OlivierHecart added the enhancement Existing things could work better label Mar 26, 2025
@OlivierHecart OlivierHecart requested a review from Mallets March 26, 2025 16:14
Copy link

codecov bot commented Mar 26, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
23 1 22 0
View the top 1 failed test(s) by shortest run time
zenoh::tests::link_weights::test_link_weights_info_diamond_peers
Stack Traces | 4.02s run time
thread 'tests::link_weights::test_link_weights_info_diamond_peers' panicked at .../src/tests/link_weights.rs:321:46:
called `Result::unwrap()` on an `Err` value: Can not create a new TCP listener bound to tcp/127.0.0.1:35004: [127.0.0.1:35004: Address already in use (os error 98) at .../zenoh-link-commons/src/tcp.rs:47.] at .../zenoh-link-tcp/src/unicast.rs:338.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

let result = ztimeout!(client_manager.open_transport_unicast(e.clone()));
assert!(result.is_err());
// Short timeout for connectionless protocols like udp and quick
let x = tokio::time::timeout(
Copy link
Member

@Mallets Mallets Mar 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it should fail and we are expecting a different timeout, I rather change the timeout in the config.
The expected error should be clear and not ambiguous.

E.g., I would rather explicitly set the open_timeout config parameter to ensure the timeout happens internally and the open_transport_unicast() returns an error.

open_timeout: 10000,

@OlivierHecart OlivierHecart force-pushed the dev/udp_del_listener branch from c45e7c4 to 9c36155 Compare April 8, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Existing things could work better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants