From f04b51ba101c70479374b72f8bfc44d89f54b49b Mon Sep 17 00:00:00 2001 From: Laurence Date: Fri, 2 May 2025 14:12:30 +0100 Subject: [PATCH] enhance: Move info outside for loop --- pkg/acquisition/modules/docker/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/acquisition/modules/docker/docker.go b/pkg/acquisition/modules/docker/docker.go index 3fa2d5c17..8a7ffc701 100644 --- a/pkg/acquisition/modules/docker/docker.go +++ b/pkg/acquisition/modules/docker/docker.go @@ -585,6 +585,7 @@ func (d *DockerSource) WatchContainer(ctx context.Context, monitChan chan *Conta // Multiple retry attempts within the error case retries := 0 + d.logger.Infof("Attempting to reconnect to Docker events stream") for { // Check for cancellation before sleeping select { @@ -610,7 +611,6 @@ func (d *DockerSource) WatchContainer(ctx context.Context, monitChan chan *Conta } // Try to reconnect - d.logger.Infof("Attempting to reconnect to Docker events stream") newEventsChan, newErrChan := d.Client.Events(ctx, options) // Check if connection is immediately broken