From ffd6dcd7bf327af6e9e284d8a875d4e56ee9aac7 Mon Sep 17 00:00:00 2001 From: Joseph Sirianni Date: Fri, 25 Jun 2021 12:39:22 -0400 Subject: [PATCH] File input: Quiet close error (#345) * reorg test files only, ported from https://github.com/open-telemetry/opentelemetry-log-collection/pull/165 * port otel enhanced file input benchmarking https://github.com/open-telemetry/opentelemetry-log-collection/pull/166 * skip closing files that are already closed --- operator/builtin/input/file/file.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/operator/builtin/input/file/file.go b/operator/builtin/input/file/file.go index 211f7cdef..a7a4734bd 100644 --- a/operator/builtin/input/file/file.go +++ b/operator/builtin/input/file/file.go @@ -134,11 +134,6 @@ func (f *InputOperator) poll(ctx context.Context) { // Wait until all the reader goroutines are finished wg.Wait() - // Close all files - for _, reader := range readers { - reader.Close() - } - f.saveCurrent(readers) f.syncLastPollFiles() }