Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(quinn-udp): tweak log levels #2048

Open
wants to merge 2 commits into from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion quinn-udp/src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ 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 {
crate::log::error!("got transmit error, halting segmentation offload");
crate::log::info!(
"`libc::sendmsg` failed with {e}; halting segmentation offload"
);
state
.max_gso_segments
.store(1, std::sync::atomic::Ordering::Relaxed);
Expand Down
9 changes: 5 additions & 4 deletions quinn-udp/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use windows_sys::Win32::Networking::WinSock;

use crate::{
cmsg::{self, CMsgHdr},
log::{debug, error},
log::debug,
log_sendmsg_error, EcnCodepoint, RecvMeta, Transmit, UdpSockRef, IO_ERROR_LOG_INTERVAL,
};

Expand Down Expand Up @@ -61,9 +61,10 @@ impl UdpSocketState {

// We don't support old versions of Windows that do not enable access to `WSARecvMsg()`
if WSARECVMSG_PTR.is_none() {
error!("network stack does not support WSARecvMsg function");

return Err(io::Error::from(io::ErrorKind::Unsupported));
return Err(io::Error::new(
io::ErrorKind::Unsupported,
"network stack does not support WSARecvMsg function",
));
}

if is_ipv4 {
Expand Down