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