From a30bc1d6f8301f563c875c491e6be564fa75d60c Mon Sep 17 00:00:00 2001 From: Michael Tharp Date: Thu, 5 Jul 2018 14:31:13 +0000 Subject: [PATCH] Fix misapplication of time.Duration that somehow resulted in continuous pings Also remove nprocs from the startup script. A single instance is needed in order for rate limits to work correctly, and multi-process isn't all that necessary anyway. Eventually einhorn will be removed and the unit file will go back to being a plain socket-activated unit. --- distro/linux/relic-einhorn | 1 - server/view_health.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/distro/linux/relic-einhorn b/distro/linux/relic-einhorn index b729ce9..46a1599 100755 --- a/distro/linux/relic-einhorn +++ b/distro/linux/relic-einhorn @@ -29,7 +29,6 @@ case "$1" in -d $sock \ -e /run/relic/einhorn.pid \ -f /run/relic/einhorn.lock \ - -n $(nproc) \ -m manual \ -q \ -b 0.0.0.0:6300,r \ diff --git a/server/view_health.go b/server/view_health.go index b61dd4f..1916301 100644 --- a/server/view_health.go +++ b/server/view_health.go @@ -49,7 +49,7 @@ func (s *Server) healthCheckLoop() { select { case <-t.C: s.healthCheck() - t.Reset(time.Second * time.Duration(interval)) + t.Reset(interval) case <-s.Closed: break }