H3: Fix WriteFrame incomplete write management
@@ -158,6 +158,7 @@ impl Future for WriteFrame {
WriteFrameState::Payload(ref mut send, ref mut p) => {
let wrote = ready!(Pin::new(send).poll_write(cx, p))?;
p.advance(wrote);
+ if p.is_empty() {
let send = match mem::replace(&mut self.state, WriteFrameState::Finished) {
WriteFrameState::Payload(s, _) => s,
_ => unreachable!(),
@@ -169,6 +170,7 @@ impl Future for WriteFrame {
}
}
}
+}
#[derive(Debug)]
pub enum Error {
