From e93ea11fe65e6df39b65553541e68340bb55f316 Mon Sep 17 00:00:00 2001 From: Raziel Cohen Date: Mon, 1 May 2023 15:03:30 +0300 Subject: [PATCH] timer correction Signed-off-by: Raziel Cohen --- pkg/conthandler/container_main_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/conthandler/container_main_handler.go b/pkg/conthandler/container_main_handler.go index 6a58daea..32bcbc55 100644 --- a/pkg/conthandler/container_main_handler.go +++ b/pkg/conthandler/container_main_handler.go @@ -164,7 +164,7 @@ func (ch *ContainerHandler) startRelevancyProcess(contEvent v1.ContainerEventDat now := time.Now() configStopTime := config.GetConfigurationConfigContext().GetSniffingMaxTimes() stopSniffingTime := now.Add(configStopTime) - for start := time.Now(); start.Before(stopSniffingTime); { + for ;time.Now().Before(stopSniffingTime); { go ch.getSBOM(contEvent) ctx, span := otel.Tracer("").Start(context.GetBackgroundContext(), "container monitoring", trace.WithAttributes(attribute.String("containerID", contEvent.GetContainerID()), attribute.String("container workload", contEvent.GetK8SWorkloadID()))) err = ch.startTimer(watchedContainer, contEvent.GetContainerID())