@@ -3,8 +3,7 @@ use std::{cell::RefCell, future::Future, rc::Rc};
3
3
use ntex:: codec:: { AsyncRead , AsyncWrite } ;
4
4
use ntex:: connect:: { self , Address , Connect , Connector } ;
5
5
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 } ;
8
7
9
8
#[ cfg( feature = "openssl" ) ]
10
9
use ntex:: connect:: openssl:: { OpensslConnector , SslConnector } ;
@@ -131,7 +130,7 @@ where
131
130
async move {
132
131
let io = fut. await ?;
133
132
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 ) ;
135
134
let io = Rc :: new ( RefCell :: new ( io) ) ;
136
135
ntex:: rt:: spawn ( ReadTask :: new ( io. clone ( ) , state. clone ( ) ) ) ;
137
136
ntex:: rt:: spawn ( WriteTask :: new ( io, state. clone ( ) ) ) ;
@@ -162,7 +161,7 @@ where
162
161
async move {
163
162
let io = fut. await ?;
164
163
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 ) ;
166
165
let io = Rc :: new ( RefCell :: new ( io) ) ;
167
166
ntex:: rt:: spawn ( ReadTask :: new ( io. clone ( ) , state. clone ( ) ) ) ;
168
167
ntex:: rt:: spawn ( WriteTask :: new ( io, state. clone ( ) ) ) ;
0 commit comments