summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tunnel-obfuscation/src/quic.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tunnel-obfuscation/src/quic.rs b/tunnel-obfuscation/src/quic.rs
index c966bf7d12..7cd4fcc305 100644
--- a/tunnel-obfuscation/src/quic.rs
+++ b/tunnel-obfuscation/src/quic.rs
@@ -151,6 +151,10 @@ impl Quic {
socket.set_mark(fwmark).map_err(Error::Fwmark)?;
}
+ // The caller is responsible for ensuring that the socket is in non-blocking mode
+ // when calling UdpSocket::from_std
+ socket.set_nonblocking(true).map_err(Error::BindError)?;
+
UdpSocket::from_std(std::net::UdpSocket::from(socket)).map_err(Error::BindError)?
};