We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b109803 commit 7e25f61Copy full SHA for 7e25f61
src/client.rs
@@ -1437,8 +1437,11 @@ where
1437
1438
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
1439
self.inner.maybe_close_connection_if_no_streams();
1440
+ let had_streams_or_refs = self.inner.has_streams_or_other_references();
1441
let result = self.inner.poll(cx).map_err(Into::into);
- if result.is_pending() && !self.inner.has_streams_or_other_references() {
1442
+ // if we had streams/refs, and don't anymore, wake up one more time to
1443
+ // ensure proper shutdown
1444
+ if result.is_pending() && had_streams_or_refs && !self.inner.has_streams_or_other_references() {
1445
tracing::trace!("last stream closed during poll, wake again");
1446
cx.waker().wake_by_ref();
1447
}
0 commit comments