network: raw socket should log as debug for transmit/receive capacity indications

This commit is contained in:
Alex Zenla committed 2024-02-15 17:55:38 +00:00
1 parent 2988d0c5cf
commit 521ee93349
1 file changed
+3 -3
+3 -3
View File
@@ -1,6 +1,6 @@
use anyhow::{anyhow, Result};
use bytes::BytesMut;
use log::warn;
use log::{debug, warn};
use std::io::ErrorKind;
use std::os::fd::{FromRawFd, IntoRawFd};
use std::os::unix::io::{AsRawFd, RawFd};
@@ -253,7 +253,7 @@ impl AsyncRawSocketChannel {
}
let buffer = (&buffer[0..len]).into();
if let Err(error) = receive_sender.try_send(buffer) {
warn!("raw socket failed to process received packet: {}", error);
debug!("raw socket failed to process received packet: {}", error);
}
}
@@ -271,7 +271,7 @@ impl AsyncRawSocketChannel {
Ok(_len) => {}
Err(ref error) => {
if error.kind() == ErrorKind::WouldBlock {
warn!("failed to transmit: would block");
debug!("failed to transmit: would block");
continue;
}
return Err(anyhow!("failed to write to raw socket: {}", error));