Fix a little bug.
@@ -145,11 +145,9 @@ where
// receive msg
if let Some(ctx) = &mut this.ctx {
- if !ctx.streams.is_empty() {
let mut closed = Vec::new();
for (id, incoming_stream) in ctx.streams.iter_mut() {
- loop {
match incoming_stream.as_mut().poll_next(cx) {
Poll::Ready(Some(res)) => {
if let Some(err) = &res.error {
@@ -183,19 +181,14 @@ where
payload: None,
},
);
- break;
- }
- Poll::Pending => {
- break;
- }
}
+ Poll::Pending => {}
}
}
for id in closed {
ctx.streams.remove(&id);
}
- }
if !ctx.send_buf.is_empty() {
continue;
