File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -557,7 +557,7 @@ impl Recv {
557557 }
558558
559559 pub fn is_end_stream ( & self , stream : & store:: Ptr ) -> bool {
560- if !stream. state . is_recv_closed ( ) {
560+ if !stream. state . is_recv_end_stream ( ) {
561561 return false ;
562562 }
563563
Original file line number Diff line number Diff line change @@ -409,15 +409,13 @@ impl State {
409409 )
410410 }
411411
412- pub fn is_closed ( & self ) -> bool {
413- matches ! ( self . inner, Closed ( _) )
412+ pub fn is_recv_end_stream ( & self ) -> bool {
413+ // In either case END_STREAM has been received
414+ matches ! ( self . inner, Closed ( Cause :: EndStream ) | HalfClosedRemote ( ..) )
414415 }
415416
416- pub fn is_recv_closed ( & self ) -> bool {
417- matches ! (
418- self . inner,
419- Closed ( ..) | HalfClosedRemote ( ..) | ReservedLocal
420- )
417+ pub fn is_closed ( & self ) -> bool {
418+ matches ! ( self . inner, Closed ( _) )
421419 }
422420
423421 pub fn is_send_closed ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -1339,7 +1339,7 @@ async fn client_decrease_initial_window_size() {
13391339 conn. drive ( async {
13401340 data ( & mut body5, "body5 data2" ) . await ;
13411341 data ( & mut body5, "body5 data3" ) . await ;
1342- assert ! ( body3. is_end_stream( ) ) ;
1342+ assert ! ( ! body3. is_end_stream( ) ) ;
13431343 } )
13441344 . await ;
13451345
You can’t perform that action at this time.
0 commit comments