Skip to content

Commit

Permalink
fix for previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
build-mesh.bot committed Nov 9, 2023
1 parent f72e68d commit ce9d5c6
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions quinn-udp/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@ impl UdpSocketState {
OPTION_ON,
)?;

if wsa_recvmsg_ptr.is_some() {
set_socket_option(
&*socket.0,
WinSock::IPPROTO_IP,
WinSock::IP_PKTINFO,
OPTION_ON,
)?;
set_socket_option(&*socket.0, WinSock::IPPROTO_IP, WinSock::IP_ECN, OPTION_ON)?;
}
set_socket_option(
&*socket.0,
WinSock::IPPROTO_IP,
WinSock::IP_PKTINFO,
OPTION_ON,
)?;
set_socket_option(&*socket.0, WinSock::IPPROTO_IP, WinSock::IP_ECN, OPTION_ON)?;
}

if is_ipv6 {
Expand All @@ -84,20 +82,18 @@ impl UdpSocketState {
OPTION_ON,
)?;

if wsa_recvmsg_ptr.is_some() {
set_socket_option(
&*socket.0,
WinSock::IPPROTO_IPV6,
WinSock::IPV6_PKTINFO,
OPTION_ON,
)?;
set_socket_option(
&*socket.0,
WinSock::IPPROTO_IPV6,
WinSock::IPV6_ECN,
OPTION_ON,
)?;
}
set_socket_option(
&*socket.0,
WinSock::IPPROTO_IPV6,
WinSock::IPV6_PKTINFO,
OPTION_ON,
)?;
set_socket_option(
&*socket.0,
WinSock::IPPROTO_IPV6,
WinSock::IPV6_ECN,
OPTION_ON,
)?;
}

let now = Instant::now();
Expand Down

0 comments on commit ce9d5c6

Please sign in to comment.