File tree 3 files changed +20
-5
lines changed 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,13 @@ impl State {
303
303
Closed ( ..) => { }
304
304
ref state => {
305
305
tracing:: trace!( "recv_eof; state={:?}" , state) ;
306
- self . inner = Closed ( Cause :: Error ( io:: ErrorKind :: BrokenPipe . into ( ) ) ) ;
306
+ self . inner = Closed ( Cause :: Error (
307
+ io:: Error :: new (
308
+ io:: ErrorKind :: BrokenPipe ,
309
+ "stream closed because of a broken pipe" ,
310
+ )
311
+ . into ( ) ,
312
+ ) ) ;
307
313
}
308
314
}
309
315
}
Original file line number Diff line number Diff line change @@ -806,7 +806,13 @@ impl Inner {
806
806
let send_buffer = & mut * send_buffer;
807
807
808
808
if actions. conn_error . is_none ( ) {
809
- actions. conn_error = Some ( io:: Error :: from ( io:: ErrorKind :: BrokenPipe ) . into ( ) ) ;
809
+ actions. conn_error = Some (
810
+ io:: Error :: new (
811
+ io:: ErrorKind :: BrokenPipe ,
812
+ "connection closed because of a broken pipe" ,
813
+ )
814
+ . into ( ) ,
815
+ ) ;
810
816
}
811
817
812
818
tracing:: trace!( "Streams::recv_eof" ) ;
Original file line number Diff line number Diff line change @@ -574,7 +574,7 @@ async fn connection_close_notifies_response_future() {
574
574
. 0
575
575
. await ;
576
576
let err = res. expect_err ( "response" ) ;
577
- assert_eq ! ( err. to_string( ) , "broken pipe" ) ;
577
+ assert_eq ! ( err. to_string( ) , "stream closed because of a broken pipe" ) ;
578
578
} ;
579
579
join ( async move { conn. await . expect ( "conn" ) } , req) . await ;
580
580
} ;
@@ -613,15 +613,18 @@ async fn connection_close_notifies_client_poll_ready() {
613
613
. 0
614
614
. await ;
615
615
let err = res. expect_err ( "response" ) ;
616
- assert_eq ! ( err. to_string( ) , "broken pipe" ) ;
616
+ assert_eq ! ( err. to_string( ) , "stream closed because of a broken pipe" ) ;
617
617
} ;
618
618
619
619
conn. drive ( req) . await ;
620
620
621
621
let err = poll_fn ( move |cx| client. poll_ready ( cx) )
622
622
. await
623
623
. expect_err ( "poll_ready" ) ;
624
- assert_eq ! ( err. to_string( ) , "broken pipe" ) ;
624
+ assert_eq ! (
625
+ err. to_string( ) ,
626
+ "connection closed because of a broken pipe"
627
+ ) ;
625
628
} ;
626
629
627
630
join ( srv, client) . await ;
You can’t perform that action at this time.
0 commit comments