Skip to content

Commit

Permalink
Merge #91
Browse files Browse the repository at this point in the history
91: Call inner writer's poll_flush instead of poll_close r=Nemo157 a=gnosek



Co-authored-by: Grzegorz Nosek <root@localdomain.pl>
  • Loading branch information
bors[bot] and gnosek committed May 15, 2020
2 parents aa52c21 + c1f97fa commit 0852f42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/futures/write/generic/encoder.rs
Expand Up @@ -151,7 +151,7 @@ impl<W: AsyncWrite, E: Encode> AsyncWrite for Encoder<W, E> {

fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> {
ready!(self.as_mut().do_poll_flush(cx))?;
ready!(self.project().writer.as_mut().poll_close(cx))?;
ready!(self.project().writer.as_mut().poll_flush(cx))?;
Poll::Ready(Ok(()))
}

Expand Down

0 comments on commit 0852f42

Please sign in to comment.