From 0aa0f326f72ecdfe51d1494ef1ec0b9a0fc1c379 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 15 Sep 2018 10:27:58 -0700 Subject: [PATCH] fix changes from master --- src/server/settings.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/server/settings.rs b/src/server/settings.rs index fe36c331..6b2fc727 100644 --- a/src/server/settings.rs +++ b/src/server/settings.rs @@ -2,7 +2,7 @@ use std::cell::{RefCell, RefMut, UnsafeCell}; use std::collections::VecDeque; use std::fmt::Write; use std::rc::Rc; -use std::time::Duration; +use std::time::{Instant, Duration}; use std::{env, fmt, net}; use bytes::BytesMut; @@ -12,7 +12,7 @@ use http::StatusCode; use lazycell::LazyCell; use parking_lot::Mutex; use time; -use tokio_timer::{sleep, Delay, Interval}; +use tokio_timer::{sleep, Delay}; use tokio_current_thread::spawn; use super::channel::Node; @@ -181,9 +181,10 @@ impl WorkerSettings { } pub fn keep_alive_timer(&self) -> Option { - if self.keep_alive != 0 { + let ka = self.0.keep_alive; + if ka != 0 { Some(Delay::new( - Instant::now() + Duration::from_secs(self.keep_alive), + Instant::now() + Duration::from_secs(ka), )) } else { None