Skip to content

Commit

Permalink
Fix Windows bug
Browse files Browse the repository at this point in the history
  • Loading branch information
VirxEC committed May 20, 2024
1 parent b3ab412 commit da94a5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct DirectorTimer(Timer);
pub struct Connection(pub UdpSocket, pub SocketAddr);

fn establish_connection(port: Res<ServerPort>, mut commands: Commands, mut state: ResMut<NextState<LoadState>>) {
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();
Expand Down

0 comments on commit da94a5d

Please sign in to comment.