Merge pull request #14 from lilydjwg/master

close client connections on error
This commit is contained in:
Y. T. CHUNG
2015-08-03 00:19:43 +08:00

View File

@@ -240,11 +240,13 @@ impl TcpRelayLocal {
Ok(0) => {
error!("Unexpected EOF while reading initialize vector");
debug!("Already read: {:?}", &iv[..total_len]);
let _ = local_writer.get_ref().shutdown(Shutdown::Both);
return;
},
Ok(n) => total_len += n,
Err(err) => {
error!("Error while reading initialize vector: {:?}", err);
let _ = local_writer.get_ref().shutdown(Shutdown::Both);
return;
}
}