From b9abb393c4b3283945c6b89494a7f1fe2eda379c Mon Sep 17 00:00:00 2001 From: Chen Donghui Date: Wed, 16 Sep 2015 18:56:45 +0800 Subject: [PATCH] load template resources every interval --- .../confd/resource/template/processor.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/github.com/kelseyhightower/confd/resource/template/processor.go b/src/github.com/kelseyhightower/confd/resource/template/processor.go index 24cfcac21..5eb0d7798 100644 --- a/src/github.com/kelseyhightower/confd/resource/template/processor.go +++ b/src/github.com/kelseyhightower/confd/resource/template/processor.go @@ -45,12 +45,12 @@ func IntervalProcessor(config Config, stopChan, doneChan chan bool, errChan chan func (p *intervalProcessor) Process() { defer close(p.doneChan) - ts, err := getTemplateResources(p.config) - if err != nil { - log.Fatal(err.Error()) - return - } for { + ts, err := getTemplateResources(p.config) + if err != nil { + log.Fatal(err.Error()) + break + } process(ts) select { case <-p.stopChan: