agent observer message modify

This commit is contained in:
geek 2017-05-11 18:05:39 +09:00
parent ac6eb35e35
commit 907fb38f0a

View File

@ -26,10 +26,10 @@ func agentStartHandler() {
func agentEndHandler() {
agentEnd := make(chan interface{}, 0)
observer.Add(messages.AGT_WILL_STOPPED, agentEnd)
observer.Add(messages.AGT_WILL_STOP, agentEnd)
go func() {
_ = <-agentEnd
observer.Remove(messages.AGT_WILL_STOPPED, agentEnd)
observer.Remove(messages.AGT_WILL_STOP, agentEnd)
observer.Remove(messages.TASK_SENSOR_ADD,_configManager.addCh)
observer.Remove(messages.TASK_SENSOR_REMOVE,_configManager.removeCh)
}()