From 9d5ea6007b905f37b7daa61fff07ec04ed5f38d4 Mon Sep 17 00:00:00 2001 From: Fae Charlton Date: Wed, 30 Sep 2020 10:49:43 -0400 Subject: [PATCH] Fix shutdown tracking in s3 input (#21380) (#21396) (cherry picked from commit d8d35a16b0beae02cb8048df2a66c3a743d0633f) --- x-pack/filebeat/input/s3/input.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/filebeat/input/s3/input.go b/x-pack/filebeat/input/s3/input.go index 6b57789b48f..83dc48428ee 100644 --- a/x-pack/filebeat/input/s3/input.go +++ b/x-pack/filebeat/input/s3/input.go @@ -190,11 +190,11 @@ func (p *s3Input) Run() { p.workerWg.Add(1) go p.run(svcSQS, svcS3, visibilityTimeout) - p.workerWg.Done() }) } func (p *s3Input) run(svcSQS sqsiface.ClientAPI, svcS3 s3iface.ClientAPI, visibilityTimeout int64) { + defer p.workerWg.Done() defer p.logger.Infof("s3 input worker for '%v' has stopped.", p.config.QueueURL) p.logger.Infof("s3 input worker has started. with queueURL: %v", p.config.QueueURL)