mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-10 20:05:55 +02:00
enhance: Move info outside for loop
This commit is contained in:
parent
38810df96b
commit
f04b51ba10
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue