From dbc74b620cc0bd23318aa8873478f798c4b71d12 Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Wed, 9 Jun 2021 16:13:27 -0400 Subject: [PATCH] Readers are closed in ReadToEnd, so don't double close --- operator/builtin/input/file/file.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/operator/builtin/input/file/file.go b/operator/builtin/input/file/file.go index df625934..52688822 100644 --- a/operator/builtin/input/file/file.go +++ b/operator/builtin/input/file/file.go @@ -151,13 +151,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 { - if err := reader.Close(); err != nil { - f.Errorf("problem closing reader", "file", reader.file.Name()) - } - } - f.saveCurrent(readers) f.syncLastPollFiles(ctx) }