Skip to content

Commit 032a179

Browse files
committed
fix(ip_recverr): rename IcmpError for non linux platforms
1 parent b1c723d commit 032a179

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

quinn-udp/src/unix.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ impl UdpSocketState {
256256
}
257257

258258
#[cfg(not(target_os = "linux"))]
259-
pub fn recv_icmp_err(&self, _socket: UdpSockRef<'_>) -> io::Result<Option<ICMPError>> {
260-
Ok(None)
259+
pub fn recv_icmp_err(&self, socket: UdpSockRef<'_>) -> io::Result<Option<IcmpError>> {
260+
recv_err(socket.0)
261261
}
262262

263263
/// The maximum amount of segments which can be transmitted if a platform
@@ -912,11 +912,11 @@ fn recv_err(io: SockRef<'_>) -> io::Result<Option<IcmpError>> {
912912
Ok(None)
913913
}
914914

915-
// I don't know about how other platforms handle this.
916-
//#[cfg(not(target_os = "linux"))]
917-
// fn recv_err(_io: &impl AsRawFd) -> io::Result<Option<(SocketAddr, ())>> {
918-
// Ok(None)
919-
// }
915+
916+
#[cfg(not(target_os = "linux"))]
917+
fn recv_err(io: SockRef<'_>) -> io::Result<Option<IcmpError>> {
918+
Ok(None)
919+
}
920920

921921
#[cfg(not(apple_slow))]
922922
// Chosen somewhat arbitrarily; might benefit from additional tuning.

0 commit comments

Comments
 (0)