diff --git a/CHANGES.md b/CHANGES.md index b0ff899..0608a13 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## [0.2.2] - 2021-08-28 + +* use new ntex's timer api + ## [0.2.1] - 2021-08-20 * cmd: Add Select and Ping commands diff --git a/Cargo.toml b/Cargo.toml index f1576ed..9d854f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntex-redis" -version = "0.2.1" +version = "0.2.2" authors = ["ntex contributors "] description = "Redis client" documentation = "https://docs.rs/ntex-redis" @@ -21,7 +21,7 @@ openssl = ["ntex/openssl"] rustls = ["ntex/rustls"] [dependencies] -ntex = "0.4.0-b.2" +ntex = "0.4.0-b.4" itoa = "0.4.5" btoi = "0.4.2" log = "0.4" diff --git a/src/connector.rs b/src/connector.rs index a73ee0c..e911139 100644 --- a/src/connector.rs +++ b/src/connector.rs @@ -3,8 +3,7 @@ use std::{cell::RefCell, future::Future, rc::Rc}; use ntex::codec::{AsyncRead, AsyncWrite}; use ntex::connect::{self, Address, Connect, Connector}; use ntex::framed::{ReadTask, State, WriteTask}; -use ntex::service::Service; -use ntex::util::ByteString; +use ntex::{service::Service, time::Seconds, util::ByteString}; #[cfg(feature = "openssl")] use ntex::connect::openssl::{OpensslConnector, SslConnector}; @@ -131,7 +130,7 @@ where async move { let io = fut.await?; - let state = State::with_params(read_hw, write_hw, lw, 0); + let state = State::with_params(read_hw, write_hw, lw, Seconds::ZERO); let io = Rc::new(RefCell::new(io)); ntex::rt::spawn(ReadTask::new(io.clone(), state.clone())); ntex::rt::spawn(WriteTask::new(io, state.clone())); @@ -162,7 +161,7 @@ where async move { let io = fut.await?; - let state = State::with_params(read_hw, write_hw, lw, 0); + let state = State::with_params(read_hw, write_hw, lw, Seconds::ZERO); let io = Rc::new(RefCell::new(io)); ntex::rt::spawn(ReadTask::new(io.clone(), state.clone())); ntex::rt::spawn(WriteTask::new(io, state.clone()));