From 0307db1a3b8f0b2bccc0d9a34caac6d4c53282d4 Mon Sep 17 00:00:00 2001 From: Sammy Libre Date: Fri, 16 Oct 2015 05:00:20 +0500 Subject: [PATCH] Fix upstream check --- proxy/proxy.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/proxy/proxy.go b/proxy/proxy.go index 7a827bf..2301da0 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -70,6 +70,13 @@ func NewEndpoint(cfg *Config) *ProxyServer { case <-refreshTimer.C: proxy.fetchBlockTemplate() refreshTimer.Reset(refreshIntv) + } + } + }() + + go func() { + for { + select { case <-checkTimer.C: proxy.checkUpstreams() checkTimer.Reset(checkIntv)