Skip to content

Commit

Permalink
use new ntex's timer api
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Aug 28, 2021
1 parent a0e4fd5 commit e15004d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ntex-redis"
version = "0.2.1"
version = "0.2.2"
authors = ["ntex contributors <[email protected]>"]
description = "Redis client"
documentation = "https://docs.rs/ntex-redis"
Expand All @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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()));
Expand Down Expand Up @@ -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()));
Expand Down

0 comments on commit e15004d

Please sign in to comment.