Silenced channel send error for StreamWrite's to master thread. If client disconnects before server send response the relay will now just silently close the connection.
This commit is contained in:
parent
fea7a127b4
commit
1b2ed7a10d
2 changed files with 12 additions and 5 deletions
15
src/data.rs
15
src/data.rs
|
|
@ -79,7 +79,9 @@ impl DownStreamInner {
|
|||
if byte_count > 0 {
|
||||
|
||||
if let Err(e) = data_out.send(FullDuplexTcpState::UpStreamWrite(self.internal_data_buffer.clone())) {
|
||||
Self::handle_error(format!("Failed to send UpStreamWrite to main thread: {}", e).as_str());
|
||||
|
||||
//Self::handle_error(format!("Failed to send UpStreamWrite to main thread: {}", e).as_str());
|
||||
let _ = raw_stream.shutdown(Shutdown::Both);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -150,7 +152,8 @@ impl DownStreamInner {
|
|||
if byte_count > 0 {
|
||||
|
||||
if let Err(e) = data_out.send(FullDuplexTcpState::UpStreamWrite(self.internal_data_buffer.clone())) {
|
||||
Self::handle_error(format!("Failed to send UpStreamWrite to main thread: {}", e).as_str());
|
||||
|
||||
//Self::handle_error(format!("Failed to send UpStreamWrite to main thread: {}", e).as_str());
|
||||
let _ = tls_stream.shutdown();
|
||||
return;
|
||||
}
|
||||
|
|
@ -292,7 +295,9 @@ impl UpStreamInner {
|
|||
if byte_count > 0 {
|
||||
|
||||
if let Err(e) = data_out.send(FullDuplexTcpState::DownStreamWrite(self.internal_data_buffer.clone())) {
|
||||
Self::handle_error(format!("Failed to send DownStreamWrite to main thread: {}", e).as_str());
|
||||
|
||||
//Self::handle_error(format!("Failed to send DownStreamWrite to main thread: {}", e).as_str());
|
||||
let _ = raw_stream.shutdown(Shutdown::Both);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -359,7 +364,9 @@ impl UpStreamInner {
|
|||
if byte_count > 0 {
|
||||
|
||||
if let Err(e) = data_out.send(FullDuplexTcpState::DownStreamWrite(self.internal_data_buffer.clone())) {
|
||||
Self::handle_error(format!("Failed to send DownStreamWrite to main thread: {}", e).as_str());
|
||||
|
||||
//Self::handle_error(format!("Failed to send DownStreamWrite to main thread: {}", e).as_str());
|
||||
let _ = tls_stream.shutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue