From 79b3f6728d72e38ccab459e43d874831ecf3baea Mon Sep 17 00:00:00 2001 From: "insanity@loafle.com" Date: Tue, 16 May 2017 15:10:29 +0900 Subject: [PATCH] agent --- agent.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/agent.go b/agent.go index 0ff5741..3f2890c 100644 --- a/agent.go +++ b/agent.go @@ -42,20 +42,19 @@ func (agt *Agent) startAgent() { globalConf := <-cfgStarted //2. evt start() - evtStartChn := make(chan bool, 0) - err := evt.Start(evtStartChn) - //if err != nil { - // processError(err) - //} - <- evtStartChn + evtStarted := make(chan bool, 0) + if err := evt.Start(evtStarted); err != nil { + log.Println(err) + return + } + <-evtStarted //3. dat start() datStarted := make(chan bool) dat.Start(datStarted, globalConf) <-datStarted //4. pol start() polStarted := make(chan bool) - err := pol.Start(polStarted, globalConf) - if err != nil { + if err := pol.Start(polStarted, globalConf); err != nil { log.Println(err) return }