diff --git a/Cargo.toml b/Cargo.toml index 29defa37..5f7506f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,17 +31,17 @@ chrono = "0.4" fnv = "1.0" log = "0.4.1" lz4-compress = "=0.1.0" -bb8 = "0.6" +bb8 = "0.7" rand = "0.4.1" snap = "0.2.3" time = "0.2.16" -tokio = { version = "0.3", features = ["net", "io-util", "rt", "sync", "macros", "rt-multi-thread"] } -tokio-rustls = { version = "0.20", optional = true } +tokio = { version = "1.0", features = ["net", "io-util", "rt", "sync", "macros", "rt-multi-thread"] } +tokio-rustls = { version = "0.22", optional = true } uuid = "0.8.1" webpki = { version = "0.21", optional = true } [dependencies.rustls] -version = "0.18" +version = "0.19" optional = true default-features = false diff --git a/src/transport.rs b/src/transport.rs index 843b0f5d..c569882c 100644 --- a/src/transport.rs +++ b/src/transport.rs @@ -15,8 +15,7 @@ use std::sync::Arc; #[cfg(feature = "rust-tls")] use tokio_rustls::{TlsConnector as RustlsConnector, client::TlsStream as RustlsStream}; use std::io; -use tokio::io::{AsyncWriteExt, ReadBuf}; -use tokio::prelude::*; +use tokio::io::{AsyncWriteExt, AsyncWrite, AsyncRead, ReadBuf}; use std::task::Context; use tokio::macros::support::{Pin, Poll}; use std::io::Error; @@ -103,8 +102,8 @@ impl CDRSTransport for TransportTcp { }) } - async fn close(&mut self, close: net::Shutdown) -> io::Result<()> { - self.tcp.shutdown(close) + async fn close(&mut self, _close: net::Shutdown) -> io::Result<()> { + self.tcp.shutdown().await } fn is_alive(&self) -> bool {