File: set-nonblocking-before-passing-to-tokio.patch

package info (click to toggle)
rust-hickory-proto 0.24.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,928 kB
  • sloc: makefile: 2
file content (24 lines) | stat: -rw-r--r-- 989 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
This patch is extracted from the upstream commit described below.

commit de3abeac3cf4c2beb96afe46fa0aae9231ff7a9b
Author: Dirkjan Ochtman <dirkjan@ochtman.nl>
Date:   Mon Mar 17 16:11:52 2025 +0100

    Update semver-compatible dependencies

diff --git proto/src/multicast/mdns_stream.rs proto/src/multicast/mdns_stream.rs
index a2b666d07c..277be89748 100644
--- proto/src/multicast/mdns_stream.rs
+++ proto/src/multicast/mdns_stream.rs
@@ -141,7 +141,10 @@ impl MdnsStream {
             Box::new(
                 next_socket
                     .map(move |socket| match socket {
-                        Ok(Some(socket)) => Ok(Some(UdpSocket::from_std(socket)?)),
+                        Ok(Some(socket)) => {
+                            socket.set_nonblocking(true)?;
+                            Ok(Some(UdpSocket::from_std(socket)?))
+                        }
                         Ok(None) => Ok(None),
                         Err(err) => Err(err),
                     })