File tree 3 files changed +7
-9
lines changed
3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -557,7 +557,7 @@ impl Recv {
557
557
}
558
558
559
559
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 ( ) {
561
561
return false ;
562
562
}
563
563
Original file line number Diff line number Diff line change @@ -409,15 +409,13 @@ impl State {
409
409
)
410
410
}
411
411
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 ( ..) )
414
415
}
415
416
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 ( _) )
421
419
}
422
420
423
421
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() {
1339
1339
conn. drive ( async {
1340
1340
data ( & mut body5, "body5 data2" ) . await ;
1341
1341
data ( & mut body5, "body5 data3" ) . await ;
1342
- assert ! ( body3. is_end_stream( ) ) ;
1342
+ assert ! ( ! body3. is_end_stream( ) ) ;
1343
1343
} )
1344
1344
. await ;
1345
1345
You can’t perform that action at this time.
0 commit comments