diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2024-02-14 17:18:25 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2024-02-14 17:18:50 +0100 |
commit | 2bfd92c35b817b87463e37c4cf2597a1b1020265 (patch) | |
tree | 76010e961e252516ea53c8fb17fe2a3c94655499 /hbak_common | |
parent | 4195e8f95dc4861be9867ad732a2cd9e0f9a225e (diff) |
don't try to send error over broken connection
Should finally fix TxError deadlock.
Diffstat (limited to 'hbak_common')
-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, } |