From da94a5ddc616c789d40ebfd5788a9024450a82a6 Mon Sep 17 00:00:00 2001 From: VirxEC Date: Mon, 20 May 2024 14:35:19 -0400 Subject: [PATCH] Fix Windows bug --- src/udp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udp.rs b/src/udp.rs index f4c1d81..b489756 100644 --- a/src/udp.rs +++ b/src/udp.rs @@ -59,7 +59,7 @@ struct DirectorTimer(Timer); pub struct Connection(pub UdpSocket, pub SocketAddr); fn establish_connection(port: Res, mut commands: Commands, mut state: ResMut>) { - let socket_addr = SocketAddr::new(IpAddr::from_str("0.0.0.0").unwrap(), port.primary_port); + let socket_addr = SocketAddr::new(IpAddr::from_str("127.0.0.1").unwrap(), port.primary_port); let socket = UdpSocket::bind(("0.0.0.0", port.secondary_port)).unwrap(); socket.send_to(&[1], socket_addr).unwrap(); socket.set_nonblocking(true).unwrap();