diff --git a/src/proto/streams/state.rs b/src/proto/streams/state.rs index 9931d41b..29efc7e9 100644 --- a/src/proto/streams/state.rs +++ b/src/proto/streams/state.rs @@ -303,7 +303,13 @@ impl State { Closed(..) => {} ref state => { tracing::trace!("recv_eof; state={:?}", state); - self.inner = Closed(Cause::Error(io::ErrorKind::BrokenPipe.into())); + self.inner = Closed(Cause::Error( + io::Error::new( + io::ErrorKind::BrokenPipe, + "stream closed because of broken pipe", + ) + .into(), + )); } } } diff --git a/src/proto/streams/streams.rs b/src/proto/streams/streams.rs index 3e7ae97d..fbf6b3ec 100644 --- a/src/proto/streams/streams.rs +++ b/src/proto/streams/streams.rs @@ -807,7 +807,13 @@ impl Inner { let send_buffer = &mut *send_buffer; if actions.conn_error.is_none() { - actions.conn_error = Some(io::Error::from(io::ErrorKind::BrokenPipe).into()); + actions.conn_error = Some( + io::Error::new( + io::ErrorKind::BrokenPipe, + "connection closed because of broken pipe", + ) + .into(), + ); } tracing::trace!("Streams::recv_eof");