mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 21:21:32 +00:00
network: raw socket should log as debug for transmit/receive capacity indications
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use bytes::BytesMut;
|
use bytes::BytesMut;
|
||||||
use log::warn;
|
use log::{debug, warn};
|
||||||
use std::io::ErrorKind;
|
use std::io::ErrorKind;
|
||||||
use std::os::fd::{FromRawFd, IntoRawFd};
|
use std::os::fd::{FromRawFd, IntoRawFd};
|
||||||
use std::os::unix::io::{AsRawFd, RawFd};
|
use std::os::unix::io::{AsRawFd, RawFd};
|
||||||
@ -253,7 +253,7 @@ impl AsyncRawSocketChannel {
|
|||||||
}
|
}
|
||||||
let buffer = (&buffer[0..len]).into();
|
let buffer = (&buffer[0..len]).into();
|
||||||
if let Err(error) = receive_sender.try_send(buffer) {
|
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) => {}
|
Ok(_len) => {}
|
||||||
Err(ref error) => {
|
Err(ref error) => {
|
||||||
if error.kind() == ErrorKind::WouldBlock {
|
if error.kind() == ErrorKind::WouldBlock {
|
||||||
warn!("failed to transmit: would block");
|
debug!("failed to transmit: would block");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return Err(anyhow!("failed to write to raw socket: {}", error));
|
return Err(anyhow!("failed to write to raw socket: {}", error));
|
||||||
|
Reference in New Issue
Block a user