From fd77267aeb482cf00f74f8ec7615b54d77592172 Mon Sep 17 00:00:00 2001 From: Roman Lomonosov Date: Wed, 30 Nov 2016 16:50:55 +0300 Subject: [PATCH] Fix died monitoring --- elock.go | 2 +- main/elock.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elock.go b/elock.go index a4819c9..bc21311 100644 --- a/elock.go +++ b/elock.go @@ -95,7 +95,7 @@ func (r *Record) IsDead() bool { refresh, _ := time.ParseDuration(r.Value.Refresh) - if r.LastRefresh().Before(time.Now().Add(4 * refresh)) { + if r.LastRefresh().Before(time.Now().Add(-4 * refresh)) { return true } diff --git a/main/elock.go b/main/elock.go index 28774c5..e0bc8f1 100644 --- a/main/elock.go +++ b/main/elock.go @@ -17,7 +17,7 @@ import ( ) const APP = "elock" -const VERSION = "0.3.1" +const VERSION = "0.3.2" type Config struct { EtcdEndpoints []string `json:"etcd-endpoints"`