Remove nonblocking instruction

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/1/head
trivernis 4 years ago
parent 9a1c1df91d
commit a90f1b5664
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,7 +1,7 @@
[package] [package]
name = "vented" name = "vented"
description = "Event driven encrypted tcp communicaton" description = "Event driven encrypted tcp communicaton"
version = "0.10.2" version = "0.10.3"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2018"
readme = "README.md" readme = "README.md"

@ -32,7 +32,6 @@ impl CryptoStream {
public_key: &PublicKey, public_key: &PublicKey,
secret_key: &SecretKey, secret_key: &SecretKey,
) -> VentedResult<Self> { ) -> VentedResult<Self> {
inner.set_nonblocking(false)?;
let send_stream = Arc::new(Mutex::new(inner.try_clone()?)); let send_stream = Arc::new(Mutex::new(inner.try_clone()?));
let recv_stream = Arc::new(Mutex::new(inner)); let recv_stream = Arc::new(Mutex::new(inner));
let send_box = EncryptionBox::new(ChaChaBox::new(public_key, secret_key)); let send_box = EncryptionBox::new(ChaChaBox::new(public_key, secret_key));
@ -103,7 +102,6 @@ impl CryptoStream {
/// Closes both streams /// Closes both streams
pub fn shutdown(&self) -> VentedResult<()> { pub fn shutdown(&self) -> VentedResult<()> {
self.send_stream.lock().shutdown(Shutdown::Both)?; self.send_stream.lock().shutdown(Shutdown::Both)?;
self.recv_stream.lock().shutdown(Shutdown::Both)?;
Ok(()) Ok(())
} }

Loading…
Cancel
Save