Allow to use framed write task for io flushing

This commit is contained in:
Nikolay Kim 2021-01-20 23:40:19 +06:00
parent 715331081c
commit 20f38402ab
6 changed files with 60 additions and 9 deletions

View file

@ -240,7 +240,10 @@ where
Poll::Pending => break,
Poll::Ready(Ok(n)) => {
if n == 0 {
log::trace!("Disconnected during flush, written {}", written);
log::trace!(
"Disconnected during flush, written {}",
written
);
self.flags.insert(Flags::DISCONNECTED);
return Poll::Ready(Err(io::Error::new(
io::ErrorKind::WriteZero,