mirror of
				https://github.com/kerberos-io/agent.git
				synced 2025-11-01 04:02:37 +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 | ||||
| 	} | ||||
|  | ||||
| 	time.Sleep(time.Second * 3) | ||||
|  | ||||
| 	close(communication.HandleMotion) | ||||
| 	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. | ||||
| 	log.Log.Info("RunAgent: waiting 3 seconds to make sure everything is properly closed.") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Cedric Verstraeten
					Cedric Verstraeten