Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
yujincheng08 committed Jul 17, 2024
1 parent 00e74c6 commit 8d1ee27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ pub(crate) fn udp(
)?;
socket.set_reuse_address(true)?;
#[cfg(not(target_os = "windows"))]
socket.set_reuse_port(true)?;
#[cfg(target_os = "windows")]
{
socket.set_reuse_port(true)?;
}
socket.bind(&SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), multi_addr.port()).into())?;
UdpSocket::from_std(socket.into())?
};
Expand Down

0 comments on commit 8d1ee27

Please sign in to comment.