agent observer message modify
This commit is contained in:
parent
ac6eb35e35
commit
907fb38f0a
|
@ -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)
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue
Block a user