Skip to content

Commit

Permalink
timer correction
Browse files Browse the repository at this point in the history
Signed-off-by: Raziel Cohen <rcohen@armosec.io>
  • Loading branch information
Raziel Cohen committed May 1, 2023
1 parent 2bf665d commit e93ea11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/conthandler/container_main_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit e93ea11

Please sign in to comment.