From 5b4903637f2cd576f71c88e6359cc5cf12073351 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Fri, 23 Feb 2018 16:17:19 +0000 Subject: make passive keepalive protocol-abiding --- src/time.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/time.rs') diff --git a/src/time.rs b/src/time.rs index 6261573..9653965 100644 --- a/src/time.rs +++ b/src/time.rs @@ -1,7 +1,6 @@ use byteorder::{ByteOrder, BigEndian}; use std::ops::Deref; use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; -use std::u64; const TAI64N_BASE: i64 = 4611686018427387914; @@ -36,7 +35,7 @@ impl From<[u8; 12]> for Tai64n { } lazy_static! { - pub static ref FOREVER: Duration = Duration::from_secs(u64::MAX); + pub static ref FOREVER: Duration = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); pub static ref FOREVER_AGO: Instant = Instant::now() - *FOREVER; } -- cgit v1.2.3-59-g8ed1b