mirror of
https://github.com/kerberos-io/agent.git
synced 2026-08-27 15:48:33 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0d2409524 |
@@ -240,6 +240,13 @@ func RunAgent(configuration *models.Configuration, communication *models.Communi
|
||||
// the agent will cleanup and restart.
|
||||
status = <-communication.HandleBootstrap
|
||||
|
||||
close(communication.HandleONVIF)
|
||||
communication.HandleONVIF = nil
|
||||
close(communication.HandleLiveHDHandshake)
|
||||
communication.HandleLiveHDHandshake = nil
|
||||
close(communication.HandleMotion)
|
||||
communication.HandleMotion = nil
|
||||
|
||||
// Here we are cleaning up everything!
|
||||
if configuration.Config.Offline != "true" {
|
||||
communication.HandleHeartBeat <- "stop"
|
||||
@@ -263,12 +270,6 @@ func RunAgent(configuration *models.Configuration, communication *models.Communi
|
||||
subQueue = nil
|
||||
communication.SubQueue = nil
|
||||
}
|
||||
close(communication.HandleONVIF)
|
||||
communication.HandleONVIF = nil
|
||||
close(communication.HandleLiveHDHandshake)
|
||||
communication.HandleLiveHDHandshake = nil
|
||||
close(communication.HandleMotion)
|
||||
communication.HandleMotion = nil
|
||||
|
||||
// Disconnect MQTT
|
||||
routers.DisconnectMQTT(mqttClient, &configuration.Config)
|
||||
|
||||
Reference in New Issue
Block a user