diff options
-rw-r--r-- | hbak_common/src/conn.rs | 11 | ||||
-rw-r--r-- | hbak_common/src/error.rs | 5 |
2 files changed, 1 insertions, 15 deletions
diff --git a/hbak_common/src/conn.rs b/hbak_common/src/conn.rs index e50d868..7ae0832 100644 --- a/hbak_common/src/conn.rs +++ b/hbak_common/src/conn.rs @@ -446,16 +446,7 @@ impl StreamConn<Active> { .unwrap() .send_message(&StreamMessage::Replicate(snapshot.into()))?; - while match send_chunk(&stream_conn.read().unwrap(), &mut r) { - Ok(is_data_left) => is_data_left, - Err(e) => { - stream_conn - .read() - .unwrap() - .send_message(&StreamMessage::End(Err(RemoteError::TxError)))?; - return Err(e); - } - } {} + while send_chunk(&stream_conn.read().unwrap(), &mut r)? {} } Ok(()) diff --git a/hbak_common/src/error.rs b/hbak_common/src/error.rs index bae983a..418447b 100644 --- a/hbak_common/src/error.rs +++ b/hbak_common/src/error.rs @@ -193,9 +193,4 @@ pub enum RemoteError { /// This is usually caused by a [`std::io::Error`] on the destination stream. #[error("Remote node reception failure")] RxError, - /// The remote node is unable to continue streaming *its* transmission. - /// This is usually caused by a [`std::io::Error`] on the source stream - /// or the network connection (or its encryption). - #[error("Remote node transmission failure")] - TxError, } |