Fix write behavior
This commit is contained in:
parent
41b25ec745
commit
aa6e8444de
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tokio-rustls"
|
name = "tokio-rustls"
|
||||||
version = "0.12.0-alpha.2"
|
version = "0.12.0-alpha.3"
|
||||||
authors = ["quininer kel <quininer@live.com>"]
|
authors = ["quininer kel <quininer@live.com>"]
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
repository = "https://github.com/quininer/tokio-rustls"
|
repository = "https://github.com/quininer/tokio-rustls"
|
||||||
|
@ -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() {
|
if !self.eof && self.session.wants_read() {
|
||||||
match self.complete_read_io(cx) {
|
match self.complete_read_io(cx) {
|
||||||
Poll::Ready(Ok(0)) => self.eof = true,
|
Poll::Ready(Ok(0)) => self.eof = true,
|
||||||
|
Loading…
Reference in New Issue
Block a user