From 1dfc9493fce9e5f76f53c4419d64d25d989a70da Mon Sep 17 00:00:00 2001 From: Fae Charlton Date: Wed, 30 Sep 2020 10:43:04 -0400 Subject: [PATCH] Fix shutdown tracking in s3 input (#21380) (#21397) (cherry picked from commit 7f5ccd3cafaa06cb150ff9469fa142664773d227) --- 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 1085c9dccbd..da30aa376c9 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)