[Fixed] should flush when shutdown
This commit is contained in:
parent
e597250fb8
commit
0913af1af9
@ -1,15 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tokio-rustls"
|
name = "tokio-rustls"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
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"
|
||||||
homepage = "https://github.com/quininer/tokio-rustls"
|
homepage = "https://github.com/quininer/tokio-rustls"
|
||||||
documentation = "https://docs.rs/tokio-rustls"
|
documentation = "https://docs.rs/tokio-rustls"
|
||||||
description = """
|
description = "Asynchronous TLS/SSL streams for Tokio using Rustls."
|
||||||
An implementation of TLS/SSL streams for Tokio giving an implementation of TLS
|
categories = ["asynchronous", "network-programming"]
|
||||||
for nonblocking I/O streams.
|
|
||||||
"""
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#[cfg_attr(feature = "tokio-proto", macro_use)] extern crate futures;
|
#[cfg_attr(feature = "tokio-proto", macro_use)] extern crate futures;
|
||||||
extern crate tokio_io;
|
#[macro_use] extern crate tokio_io;
|
||||||
extern crate rustls;
|
extern crate rustls;
|
||||||
|
|
||||||
pub mod proto;
|
pub mod proto;
|
||||||
@ -244,6 +244,7 @@ impl<S, C> AsyncWrite for TlsStream<S, C>
|
|||||||
{
|
{
|
||||||
fn shutdown(&mut self) -> Poll<(), io::Error> {
|
fn shutdown(&mut self) -> Poll<(), io::Error> {
|
||||||
self.session.send_close_notify();
|
self.session.send_close_notify();
|
||||||
|
try_nb!(io::Write::flush(self));
|
||||||
self.io.shutdown()
|
self.io.shutdown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user