From 8685ce31a232e4d359eef88ae59af9788e13cd24 Mon Sep 17 00:00:00 2001 From: cedricve Date: Sat, 5 Jul 2025 18:31:35 +0000 Subject: [PATCH] Add logging for zero startRecording state in HandleRecordStream --- machinery/src/capture/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/machinery/src/capture/main.go b/machinery/src/capture/main.go index bcce1c0..0ec637d 100644 --- a/machinery/src/capture/main.go +++ b/machinery/src/capture/main.go @@ -448,6 +448,12 @@ func HandleRecordStream(queue *packets.Queue, configDirectory string, configurat startRecording = lastRecordingTime } + // If startRecording is 0, we will continue as it might be we are in a state of restarting the agent. + if startRecording == 0 { + log.Log.Info("capture.main.HandleRecordStream(motiondetection): startRecording is 0, we will continue as it might be we are in a state of restarting the agent.") + continue + } + // timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token // 1564859471_6-474162_oprit_577-283-727-375_1153_27.mp4 // - Timestamp