From eab0875306654e20d360fa2141f8a446b70b84c6 Mon Sep 17 00:00:00 2001 From: geek Date: Thu, 11 May 2017 18:56:57 +0900 Subject: [PATCH] event stop add --- event_sender.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/event_sender.go b/event_sender.go index f283992..26e535b 100644 --- a/event_sender.go +++ b/event_sender.go @@ -43,7 +43,7 @@ func init() { ch := make(chan interface{}, 0) ch1 := make(chan interface{}, 0) observer.Add(messages.CFG_LOADED, ch) - observer.Add(messages.SCF_STOPPED,ch1) + observer.Add(messages.SCF_STOPPED, ch1) handleInit(ch, ch1) } @@ -58,9 +58,9 @@ func handleInit(ch chan interface{}, ch1 chan interface{}) { }() go func() { - data := <- ch1 - observer.Notify(messages.QUEUE_DATA, data) - time.Sleep(2*time.Second) + data := <-ch1 + observer.Notify(messages.QUEUE_EVENT, data) + time.Sleep(2 * time.Second) es.Stop() }() }