diff options
author | Bert Belder <bertbelder@gmail.com> | 2021-10-20 01:30:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 01:30:04 +0200 |
commit | 6a9656098671d19b2cbfedfef4db0df6f84735d1 (patch) | |
tree | a29a1fbb03e6ced6eda1e53999cf2c18f61c1451 /ext/net/io.rs | |
parent | 4f48efcc55b9e6cc0dd212ebd8e729909efed1ab (diff) |
fix(ext/net): fix TLS bugs and add 'op_tls_handshake' (#12501)
A bug was fixed that could cause a hang when a method was
called on a TlsConn object that had thrown an exception earlier.
Additionally, a bug was fixed that caused TlsConn.write() to not
completely flush large buffers (>64kB) to the socket.
The public `TlsConn.handshake()` API is scheduled for inclusion in the
next minor release. See https://github.com/denoland/deno/pull/12467.
Diffstat (limited to 'ext/net/io.rs')
-rw-r--r-- | ext/net/io.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/ext/net/io.rs b/ext/net/io.rs index 6a93b8cf6..6cefbde2d 100644 --- a/ext/net/io.rs +++ b/ext/net/io.rs @@ -1,6 +1,6 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -use crate::ops_tls as tls; +use crate::ops_tls::TlsStreamResource; use deno_core::error::not_supported; use deno_core::error::AnyError; use deno_core::op_async; @@ -114,18 +114,6 @@ impl Resource for TcpStreamResource { } } -pub type TlsStreamResource = FullDuplexResource<tls::ReadHalf, tls::WriteHalf>; - -impl Resource for TlsStreamResource { - fn name(&self) -> Cow<str> { - "tlsStream".into() - } - - fn close(self: Rc<Self>) { - self.cancel_read_ops(); - } -} - #[cfg(unix)] pub type UnixStreamResource = FullDuplexResource<unix::OwnedReadHalf, unix::OwnedWriteHalf>; |