Skip to content

Commit fc268ed

Browse files
authored
Fix shutdown tracking in s3 input (#21380) (#21397)
(cherry picked from commit d8d35a1)
1 parent 9d5707c commit fc268ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/filebeat/input/s3/input.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ func (p *s3Input) Run() {
190190

191191
p.workerWg.Add(1)
192192
go p.run(svcSQS, svcS3, visibilityTimeout)
193-
p.workerWg.Done()
194193
})
195194
}
196195

197196
func (p *s3Input) run(svcSQS sqsiface.ClientAPI, svcS3 s3iface.ClientAPI, visibilityTimeout int64) {
197+
defer p.workerWg.Done()
198198
defer p.logger.Infof("s3 input worker for '%v' has stopped.", p.config.QueueURL)
199199

200200
p.logger.Infof("s3 input worker has started. with queueURL: %v", p.config.QueueURL)

0 commit comments

Comments
 (0)