diff --git a/Cargo.toml b/Cargo.toml index a4c0e67..63b4122 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tokio-rustls" -version = "0.12.0-alpha.2" +version = "0.12.0-alpha.3" authors = ["quininer kel "] license = "MIT/Apache-2.0" repository = "https://github.com/quininer/tokio-rustls" diff --git a/src/common/mod.rs b/src/common/mod.rs index ac72608..1af5ecb 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -110,6 +110,14 @@ impl<'a, IO: AsyncRead + AsyncWrite + Unpin, S: Session> Stream<'a, IO, S> { } } + if let Focus::Writable = focus { + if !write_would_block { + return Poll::Ready(Ok((rdlen, wrlen))); + } else { + return Poll::Pending; + } + } + if !self.eof && self.session.wants_read() { match self.complete_read_io(cx) { Poll::Ready(Ok(0)) => self.eof = true,