File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,16 @@ impl Send {
466466 store. try_for_each ( |mut stream| {
467467 let stream = & mut * stream;
468468
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+
469479 tracing:: trace!(
470480 "decrementing stream window; id={:?}; decr={}; flow={:?}" ,
471481 stream. id,
Original file line number Diff line number Diff line change @@ -1859,7 +1859,7 @@ async fn poll_capacity_wakeup_after_window_update() {
18591859}
18601860
18611861#[ tokio:: test]
1862- async fn window_size_decremented_past_zero ( ) {
1862+ async fn window_size_does_not_underflow ( ) {
18631863 h2_support:: trace_init!( ) ;
18641864 let ( io, mut client) = mock:: new ( ) ;
18651865
@@ -1891,9 +1891,7 @@ async fn window_size_decremented_past_zero() {
18911891 let builder = server:: Builder :: new ( ) ;
18921892 let mut srv = builder. handshake :: < _ , Bytes > ( io) . await . expect ( "handshake" ) ;
18931893
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 ( ) ;
18971895 } ;
18981896
18991897 join ( client, srv) . await ;
You can’t perform that action at this time.
0 commit comments