From 392355e151796bc2fb14b1411a9471c7b2b4ce4c Mon Sep 17 00:00:00 2001 From: trivernis Date: Mon, 9 Nov 2020 22:48:01 +0100 Subject: [PATCH] Remove read timeout that causes connection failures Signed-off-by: trivernis --- Cargo.toml | 2 +- src/server/mod.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a5e21c0..8077b46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vented" description = "Event driven encrypted tcp communicaton" -version = "0.10.3" +version = "0.10.4" authors = ["trivernis "] edition = "2018" readme = "README.md" diff --git a/src/server/mod.rs b/src/server/mod.rs index eb3bd34..06d76d6 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -362,7 +362,6 @@ impl VentedServer { /// then establishing an encrypted connection fn handle_connection(context: ServerConnectionContext, stream: TcpStream) -> VentedResult<()> { let event_handler = Arc::clone(&context.event_handler); - stream.set_read_timeout(Some(Duration::from_secs(CONNECTION_TIMEOUT_SECONDS)))?; stream.set_write_timeout(Some(Duration::from_secs(CONNECTION_TIMEOUT_SECONDS)))?; log::trace!( "Received connection from {}", @@ -452,7 +451,6 @@ impl VentedServer { address: String, ) -> VentedResult { let stream = TcpStream::connect(address)?; - stream.set_read_timeout(Some(Duration::from_secs(CONNECTION_TIMEOUT_SECONDS)))?; stream.set_write_timeout(Some(Duration::from_secs(CONNECTION_TIMEOUT_SECONDS)))?; context.is_server = false; let stream = Self::get_crypto_stream(context, stream)?;