Skip to content

Commit e15004d

Browse files
committed
use new ntex's timer api
1 parent a0e4fd5 commit e15004d

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## [0.2.2] - 2021-08-28
4+
5+
* use new ntex's timer api
6+
37
## [0.2.1] - 2021-08-20
48

59
* cmd: Add Select and Ping commands

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ntex-redis"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["ntex contributors <[email protected]>"]
55
description = "Redis client"
66
documentation = "https://docs.rs/ntex-redis"
@@ -21,7 +21,7 @@ openssl = ["ntex/openssl"]
2121
rustls = ["ntex/rustls"]
2222

2323
[dependencies]
24-
ntex = "0.4.0-b.2"
24+
ntex = "0.4.0-b.4"
2525
itoa = "0.4.5"
2626
btoi = "0.4.2"
2727
log = "0.4"

src/connector.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ use std::{cell::RefCell, future::Future, rc::Rc};
33
use ntex::codec::{AsyncRead, AsyncWrite};
44
use ntex::connect::{self, Address, Connect, Connector};
55
use ntex::framed::{ReadTask, State, WriteTask};
6-
use ntex::service::Service;
7-
use ntex::util::ByteString;
6+
use ntex::{service::Service, time::Seconds, util::ByteString};
87

98
#[cfg(feature = "openssl")]
109
use ntex::connect::openssl::{OpensslConnector, SslConnector};
@@ -131,7 +130,7 @@ where
131130
async move {
132131
let io = fut.await?;
133132

134-
let state = State::with_params(read_hw, write_hw, lw, 0);
133+
let state = State::with_params(read_hw, write_hw, lw, Seconds::ZERO);
135134
let io = Rc::new(RefCell::new(io));
136135
ntex::rt::spawn(ReadTask::new(io.clone(), state.clone()));
137136
ntex::rt::spawn(WriteTask::new(io, state.clone()));
@@ -162,7 +161,7 @@ where
162161
async move {
163162
let io = fut.await?;
164163

165-
let state = State::with_params(read_hw, write_hw, lw, 0);
164+
let state = State::with_params(read_hw, write_hw, lw, Seconds::ZERO);
166165
let io = Rc::new(RefCell::new(io));
167166
ntex::rt::spawn(ReadTask::new(io.clone(), state.clone()));
168167
ntex::rt::spawn(WriteTask::new(io, state.clone()));

0 commit comments

Comments
 (0)