Fix test
This commit is contained in:
parent
c190031761
commit
0386abcee1
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tokio-rustls"
|
name = "tokio-rustls"
|
||||||
version = "0.12.0-alpha.1"
|
version = "0.12.0-alpha.2"
|
||||||
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"
|
||||||
|
@ -249,6 +249,7 @@ impl<'a, IO: AsyncRead + AsyncWrite + Unpin, S: Session> AsyncWrite for Stream<'
|
|||||||
while this.session.wants_write() {
|
while this.session.wants_write() {
|
||||||
futures::ready!(this.complete_inner_io(cx, Focus::Writable))?;
|
futures::ready!(this.complete_inner_io(cx, Focus::Writable))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pin::new(&mut this.io).poll_shutdown(cx)
|
Pin::new(&mut this.io).poll_shutdown(cx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,13 +44,15 @@ lazy_static!{
|
|||||||
let fut = async move {
|
let fut = async move {
|
||||||
let mut stream = acceptor.accept(stream?).await?;
|
let mut stream = acceptor.accept(stream?).await?;
|
||||||
|
|
||||||
// TODO split
|
// TODO split
|
||||||
// let (mut reader, mut write) = stream.split();
|
//
|
||||||
// reader.copy(&mut write).await?;
|
// let (mut reader, mut write) = stream.split();
|
||||||
|
// reader.copy(&mut write).await?;
|
||||||
|
|
||||||
let mut buf = vec![0; 8192];
|
let mut buf = vec![0; 8192];
|
||||||
let n = stream.read(&mut buf).await?;
|
let n = stream.read(&mut buf).await?;
|
||||||
stream.write(&buf[..n]).await?;
|
stream.write(&buf[..n]).await?;
|
||||||
|
let _ = stream.read(&mut buf).await?;
|
||||||
|
|
||||||
Ok(()) as io::Result<()>
|
Ok(()) as io::Result<()>
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user