Skip to content

Commit

Permalink
refactor(udp): add use declaration for tracing debug and error
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden authored and Ralith committed Jul 19, 2024
1 parent 411abe9 commit 349dcd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions quinn-udp/src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use std::{
};

use socket2::SockRef;
use tracing::{debug, error};

use super::{
cmsg, log_sendmsg_error, EcnCodepoint, RecvMeta, Transmit, UdpSockRef, IO_ERROR_LOG_INTERVAL,
Expand Down Expand Up @@ -87,7 +88,7 @@ impl UdpSocketState {
if is_ipv4 || !io.only_v6()? {
if let Err(err) = set_socket_option(&*io, libc::IPPROTO_IP, libc::IP_RECVTOS, OPTION_ON)
{
tracing::debug!("Ignoring error setting IP_RECVTOS on socket: {err:?}",);
debug!("Ignoring error setting IP_RECVTOS on socket: {err:?}",);
}
}

Expand Down Expand Up @@ -283,7 +284,7 @@ fn send(
// Prevent new transmits from being scheduled using GSO. Existing GSO transmits
// may already be in the pipeline, so we need to tolerate additional failures.
if state.max_gso_segments() > 1 {
tracing::error!("got transmit error, halting segmentation offload");
error!("got transmit error, halting segmentation offload");
state
.max_gso_segments
.store(1, std::sync::atomic::Ordering::Relaxed);
Expand Down

0 comments on commit 349dcd6

Please sign in to comment.