Skip to content
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

Prioritize endpoint config over configuration file, add interface binding for TLS link #1635

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion commons/zenoh-protocol/src/core/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,9 @@ impl ConfigMut<'_> {
self.0.address(),
self.0.metadata(),
parameters::from_iter(parameters::sort(parameters::join(
self.0.config().iter(),
// Endpoint config overwrites incoming config
iter.map(|(k, v)| (k.borrow(), v.borrow())),
self.0.config().iter(),
oteffahi marked this conversation as resolved.
Show resolved Hide resolved
))),
)?;

Expand Down
14 changes: 1 addition & 13 deletions zenoh/tests/tcp_buffers.rs
oteffahi marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,8 @@ fn buffer_size_endpoint() {
zenoh::open(config).wait().unwrap();
}

#[cfg(target_os = "macos")]
#[test]
#[should_panic(expected = "Can not create a new TCP listener")]
fn buffer_size_override() {
buffer_size_config_override();
}

#[cfg(not(target_os = "macos"))]
#[test]
fn buffer_size_override() {
buffer_size_config_override();
}

fn buffer_size_config_override() {
fn buffer_size_endpoint_overwrite() {
let mut config = Config::default();
config
.insert_json5(
Expand Down
Loading