File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1437,8 +1437,11 @@ where
1437
1437
1438
1438
fn poll ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
1439
1439
self . inner . maybe_close_connection_if_no_streams ( ) ;
1440
+ let had_streams_or_refs = self . inner . has_streams_or_other_references ( ) ;
1440
1441
let result = self . inner . poll ( cx) . map_err ( Into :: into) ;
1441
- 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 ( ) {
1442
1445
tracing:: trace!( "last stream closed during poll, wake again" ) ;
1443
1446
cx. waker ( ) . wake_by_ref ( ) ;
1444
1447
}
You can’t perform that action at this time.
0 commit comments