From 81040de23d06eb2265dadb444c4e6ff0e974e4b0 Mon Sep 17 00:00:00 2001 From: PinkP4nther <0x0090@protonmail.com> Date: Mon, 13 Sep 2021 13:48:13 -0700 Subject: [PATCH] Added thread specifiers to error verbose --- src/data.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data.rs b/src/data.rs index 70faefb..cf7384f 100644 --- a/src/data.rs +++ b/src/data.rs @@ -61,7 +61,7 @@ impl DownStreamInner { drop(stream_lock); if let Err(e) = data_out.send(FullDuplexTcpState::DownStreamRead) { - println!("[SSLRelay Error]: Failed to send DownStreamRead ready notifier to main thread: {}", e); + println!("[SSLRelay DownStream Thread Error]: Failed to send DownStreamRead ready notifier to main thread: {}", e); return; } }, @@ -88,7 +88,7 @@ impl DownStreamInner { if byte_count > 0 { if let Err(e) = data_out.send(FullDuplexTcpState::UpStreamWrite(self.internal_data_buffer.clone())) { - println!("[SSLRelay Error]: Failed to send UpStreamWrite to main thread: {}", e); + println!("[SSLRelay DownStream Thread Error]: Failed to send UpStreamWrite to main thread: {}", e); return; } @@ -116,7 +116,7 @@ impl DownStreamInner { } else if byte_count == 0 || byte_count == -2 { if let Err(e) = data_out.send(FullDuplexTcpState::DownStreamShutDown) { - println!("[SSLRelay Error]: Failed to send shutdown signal to main thread from DownStream thread: {}", e); + println!("[SSLRelay DownStream Thread Error]: Failed to send shutdown signal to main thread from DownStream thread: {}", e); return; } let _ = self.ds_stream.as_ref().unwrap().lock().unwrap().get_ref().shutdown(Shutdown::Both); @@ -223,7 +223,7 @@ impl UpStreamInner { drop(stream_lock); if let Err(e) = data_out.send(FullDuplexTcpState::UpStreamRead) { - println!("[SSLRelay Error]: Failed to send UpStreamRead ready notifier to main thread: {}", e); + println!("[SSLRelay UpStream Thread Error]: Failed to send UpStreamRead ready notifier to main thread: {}", e); return; } }, @@ -249,7 +249,7 @@ impl UpStreamInner { if byte_count > 0 { if let Err(e) = data_out.send(FullDuplexTcpState::DownStreamWrite(self.internal_data_buffer.clone())) { - println!("[SSLRelay Error]: Failed to send DownStreamWrite to main thread: {}", e); + println!("[SSLRelay UpStream Thread Error]: Failed to send DownStreamWrite to main thread: {}", e); return; } @@ -275,7 +275,7 @@ impl UpStreamInner { } else if byte_count == 0 || byte_count == -2 { if let Err(e) = data_out.send(FullDuplexTcpState::UpStreamShutDown) { - println!("[SSLRelay Error]: Failed to send shutdown signal to main thread from UpStream thread: {}", e); + println!("[SSLRelay UpStream Thread Error]: Failed to send shutdown signal to main thread from UpStream thread: {}", e); return; } let _ = self.us_stream.as_ref().unwrap().lock().unwrap().get_ref().shutdown(Shutdown::Both);