Skip to content

Commit

Permalink
fixup! Re-design the StreamMuxer trait
Browse files Browse the repository at this point in the history
First send Close frame, then flush the stream. Doing things in this
order makes the tests pass without knowing exactly how much data
we need to read.
  • Loading branch information
thomaseizinger committed Jun 2, 2022
1 parent 2c940f0 commit cec1176
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion muxers/mplex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ where
let this = self.get_mut();
let mut io = this.io.lock();

ready!(io.poll_flush_stream(cx, this.id))?;
ready!(io.poll_close_stream(cx, this.id))?;
ready!(io.poll_flush_stream(cx, this.id))?;

Poll::Ready(Ok(()))
}
Expand Down

0 comments on commit cec1176

Please sign in to comment.