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) }