File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,16 @@ impl Send {
466
466
store. try_for_each ( |mut stream| {
467
467
let stream = & mut * stream;
468
468
469
+ if stream. state . is_send_closed ( ) && stream. buffered_send_data == 0 {
470
+ tracing:: trace!(
471
+ "skipping send-closed stream; id={:?}; flow={:?}" ,
472
+ stream. id,
473
+ stream. send_flow
474
+ ) ;
475
+
476
+ return Ok ( ( ) ) ;
477
+ }
478
+
469
479
tracing:: trace!(
470
480
"decrementing stream window; id={:?}; decr={}; flow={:?}" ,
471
481
stream. id,
Original file line number Diff line number Diff line change @@ -1859,7 +1859,7 @@ async fn poll_capacity_wakeup_after_window_update() {
1859
1859
}
1860
1860
1861
1861
#[ tokio:: test]
1862
- async fn window_size_decremented_past_zero ( ) {
1862
+ async fn window_size_does_not_underflow ( ) {
1863
1863
h2_support:: trace_init!( ) ;
1864
1864
let ( io, mut client) = mock:: new ( ) ;
1865
1865
@@ -1891,9 +1891,7 @@ async fn window_size_decremented_past_zero() {
1891
1891
let builder = server:: Builder :: new ( ) ;
1892
1892
let mut srv = builder. handshake :: < _ , Bytes > ( io) . await . expect ( "handshake" ) ;
1893
1893
1894
- // just keep it open
1895
- let res = poll_fn ( move |cx| srv. poll_closed ( cx) ) . await ;
1896
- tracing:: debug!( "{:?}" , res) ;
1894
+ poll_fn ( move |cx| srv. poll_closed ( cx) ) . await . unwrap ( ) ;
1897
1895
} ;
1898
1896
1899
1897
join ( client, srv) . await ;
You can’t perform that action at this time.
0 commit comments