Skip to content

Commit

Permalink
Use warning while binding the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan committed Mar 1, 2024
1 parent 6a19387 commit 644a3e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commons/zenoh-util/src/std_only/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ pub fn set_bind_to_device_udp_socket(socket: &UdpSocket, iface: Option<&str>) ->

#[cfg(any(target_os = "macos", target_os = "windows"))]
pub fn set_bind_to_device_tcp_socket(socket: &TcpSocket, iface: Option<&str>) -> ZResult<()> {
bail!("Binding the socket {socket:?} to the interface {iface:?} is not supported on macOS and Windows");
log::warn!("Binding the socket {socket:?} to the interface {iface:?} is not supported on macOS and Windows");
}

#[cfg(any(target_os = "macos", target_os = "windows"))]
pub fn set_bind_to_device_udp_socket(socket: &UdpSocket, iface: Option<&str>) -> ZResult<()> {
bail!("Binding the socket {socket:?} to the interface {iface:?} is not supported on macOS and Windows");
log::warn!("Binding the socket {socket:?} to the interface {iface:?} is not supported on macOS and Windows");
}

0 comments on commit 644a3e4

Please sign in to comment.