From e065ddc21bd2ebfc4986061e383e59575fb7ab76 Mon Sep 17 00:00:00 2001 From: Mystikfluu Date: Tue, 23 May 2023 19:44:30 +0200 Subject: [PATCH] correct error message when binding failed --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 132ec5a..e843951 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,7 +36,7 @@ fn main() { let filename = "data.bin"; let local_addr: SocketAddr = "0.0.0.0:0".parse().expect("Failed to parse address"); - let socket = UdpSocket::bind(local_addr).expect("Failed to bind socket to port 26000"); + let socket = UdpSocket::bind(local_addr).expect("Failed to bind socket"); socket.set_read_timeout(Some(std::time::Duration::new(timeout, 0))).expect("set_read_timeout call failed"); //socket.set_nonblocking(true).expect("set_nonblocking call failed");