From 37b37b58708307fe26dd2142f64cf936e8d24c9b Mon Sep 17 00:00:00 2001 From: "insanity@loafle.com" Date: Thu, 11 May 2017 20:07:05 +0900 Subject: [PATCH] long poller --- poller_event.go | 4 ++-- poller_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/poller_event.go b/poller_event.go index 66b52ba..47d2e4b 100644 --- a/poller_event.go +++ b/poller_event.go @@ -9,12 +9,12 @@ func handleConfigLoaded() { ch := make(chan interface{}, 0) observer.Add(messages.CFG_LOADED, ch) startPoller(ch) - observer.Remove(messages.CFG_LOADED, ch) + //observer.Remove(messages.CFG_LOADED, ch) } func (p *Poller) handleAgentStop() { ch := make(chan interface{}, 0) observer.Add(messages.AGT_STOPPED, ch) p.Stop() - observer.Remove(messages.AGT_STOPPED, ch) + //observer.Remove(messages.AGT_STOPPED, ch) } diff --git a/poller_test.go b/poller_test.go index 4a206f2..9b4112a 100644 --- a/poller_test.go +++ b/poller_test.go @@ -15,6 +15,6 @@ func TestPolling(t *testing.T) { func TestTotal(t *testing.T) { time.Sleep(time.Second * 5) - observer.Notify(messages.CONFIGMANAGER_LOADED, "") //CONFIG LOCATION + observer.Notify(messages.CFG_LOADED, "") //CONFIG LOCATION time.Sleep(time.Second * 100) }