mirror of
https://github.com/kerberos-io/agent.git
synced 2025-11-02 20:44:00 +08:00
wait a bit to close the motion channel, also close audio channel
This commit is contained in:
@@ -357,10 +357,13 @@ func RunAgent(configDirectory string, configuration *models.Configuration, commu
|
|||||||
communication.SubQueue = nil
|
communication.SubQueue = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time.Sleep(time.Second * 3)
|
||||||
|
|
||||||
close(communication.HandleMotion)
|
close(communication.HandleMotion)
|
||||||
communication.HandleMotion = nil
|
communication.HandleMotion = nil
|
||||||
//close(communication.HandleAudio)
|
|
||||||
//communication.HandleAudio = nil
|
close(communication.HandleAudio)
|
||||||
|
communication.HandleAudio = nil
|
||||||
|
|
||||||
// Waiting for some seconds to make sure everything is properly closed.
|
// Waiting for some seconds to make sure everything is properly closed.
|
||||||
log.Log.Info("RunAgent: waiting 3 seconds to make sure everything is properly closed.")
|
log.Log.Info("RunAgent: waiting 3 seconds to make sure everything is properly closed.")
|
||||||
|
|||||||
Reference in New Issue
Block a user