File tree Expand file tree Collapse file tree 3 files changed +3
-14
lines changed Expand file tree Collapse file tree 3 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -482,10 +482,7 @@ where
482
482
// without error
483
483
//
484
484
// See https://github.com/hyperium/hyper/issues/3427
485
- if self . streams . is_server ( )
486
- && self . streams . is_buffer_empty ( )
487
- && matches ! ( kind, io:: ErrorKind :: UnexpectedEof )
488
- {
485
+ if self . streams . is_buffer_empty ( ) && matches ! ( kind, io:: ErrorKind :: UnexpectedEof ) {
489
486
* self . state = State :: Closed ( Reason :: NO_ERROR , Initiator :: Library ) ;
490
487
return Ok ( ( ) ) ;
491
488
}
Original file line number Diff line number Diff line change @@ -337,10 +337,6 @@ impl<B> DynStreams<'_, B> {
337
337
self . send_buffer . is_empty ( )
338
338
}
339
339
340
- pub fn is_server ( & self ) -> bool {
341
- self . peer . is_server ( )
342
- }
343
-
344
340
pub fn recv_headers ( & mut self , frame : frame:: Headers ) -> Result < ( ) , Error > {
345
341
let mut me = self . inner . lock ( ) . unwrap ( ) ;
346
342
Original file line number Diff line number Diff line change @@ -1914,7 +1914,7 @@ async fn receive_settings_frame_twice_with_second_one_non_empty() {
1914
1914
}
1915
1915
1916
1916
#[ tokio:: test]
1917
- async fn server_drop_connection_unexpectedly_return_unexpected_eof_err ( ) {
1917
+ async fn server_drop_connection_without_close_notify ( ) {
1918
1918
h2_support:: trace_init!( ) ;
1919
1919
let ( io, mut srv) = mock:: new ( ) ;
1920
1920
@@ -1944,11 +1944,7 @@ async fn server_drop_connection_unexpectedly_return_unexpected_eof_err() {
1944
1944
. await
1945
1945
. expect ( "request" ) ;
1946
1946
} ) ;
1947
- let err = h2. await . expect_err ( "should receive UnexpectedEof" ) ;
1948
- assert_eq ! (
1949
- err. get_io( ) . expect( "should be UnexpectedEof" ) . kind( ) ,
1950
- io:: ErrorKind :: UnexpectedEof ,
1951
- ) ;
1947
+ let err = h2. await . unwrap ( ) ;
1952
1948
} ;
1953
1949
join ( srv, h2) . await ;
1954
1950
}
You can’t perform that action at this time.
0 commit comments