From 601f4991265259e6859270dfd7974772f82f0247 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Mon, 8 Jul 2019 14:48:47 -0700 Subject: [PATCH] Remove tail cleanup call to avoid double decrement (#6089) --- plugins/inputs/logparser/logparser.go | 1 - plugins/inputs/tail/tail.go | 4 ---- 2 files changed, 5 deletions(-) diff --git a/plugins/inputs/logparser/logparser.go b/plugins/inputs/logparser/logparser.go index a7fd97e8e..e724f2d4b 100644 --- a/plugins/inputs/logparser/logparser.go +++ b/plugins/inputs/logparser/logparser.go @@ -294,7 +294,6 @@ func (l *LogParserPlugin) Stop() { if err != nil { log.Printf("E! Error stopping tail on file %s\n", t.Filename) } - t.Cleanup() } close(l.done) l.wg.Wait() diff --git a/plugins/inputs/tail/tail.go b/plugins/inputs/tail/tail.go index bdfa2de44..834d7cf8f 100644 --- a/plugins/inputs/tail/tail.go +++ b/plugins/inputs/tail/tail.go @@ -9,7 +9,6 @@ import ( "sync" "github.com/influxdata/tail" - "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/internal/globpath" "github.com/influxdata/telegraf/plugins/inputs" @@ -213,9 +212,6 @@ func (t *Tail) Stop() { } } - for _, tailer := range t.tailers { - tailer.Cleanup() - } t.wg.Wait() }