chore(net): log p2p stream flush error (#11659)

This commit is contained in:
Emilia Hane
2024-10-11 15:34:52 +02:00
committed by GitHub
parent 6d3aa5a0d5
commit c29c1f5fa8

View File

@ -616,7 +616,13 @@ where
let mut this = self.project();
loop {
match ready!(this.inner.as_mut().poll_flush(cx)) {
Err(err) => return Poll::Ready(Err(err.into())),
Err(err) => {
trace!(target: "net::p2p",
%err,
"error flushing p2p stream"
);
return Poll::Ready(Err(err.into()))
}
Ok(()) => {
let Some(message) = this.outgoing_messages.pop_front() else {
return Poll::Ready(Ok(()))