From 5a79d230ce11ff61c6886a925fd557dfbe56c69a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 21 May 2023 12:45:14 +0300 Subject: [PATCH] ptp: Set UDP sockets as non-blocking Part-of: --- subprojects/gstreamer/libs/gst/helpers/ptp/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gstreamer/libs/gst/helpers/ptp/main.rs b/subprojects/gstreamer/libs/gst/helpers/ptp/main.rs index 76f7840b52..e6694875e9 100644 --- a/subprojects/gstreamer/libs/gst/helpers/ptp/main.rs +++ b/subprojects/gstreamer/libs/gst/helpers/ptp/main.rs @@ -81,6 +81,9 @@ fn create_socket(port: u16) -> Result { let socket = UdpSocket::bind(SocketAddr::from((Ipv4Addr::UNSPECIFIED, port))) .with_context(|| format!("Failed to bind socket to port {}", port))?; + socket + .set_nonblocking(true) + .context("Failed setting socket non-blocking")?; socket.set_ttl(1).context("Failed setting TTL on socket")?; socket .set_multicast_ttl_v4(1)