diff --git a/input_file.go b/input_file.go index b562a9914..ba3f542a8 100644 --- a/input_file.go +++ b/input_file.go @@ -189,6 +189,7 @@ func (i *FileInput) emit() { log.Printf("FileInput: end of file '%s'\n", i.path) } -func (i *FileInput) Close() { +func (i *FileInput) Close() error { i.currentFile.Close() + return nil } diff --git a/input_raw.go b/input_raw.go index c67cd8cd9..7b9209664 100644 --- a/input_raw.go +++ b/input_raw.go @@ -97,7 +97,8 @@ func (i *RAWInput) String() string { return "Intercepting traffic from: " + i.address } -func (i *RAWInput) Close() { +func (i *RAWInput) Close() error { i.listener.Close() close(i.quit) + return nil } diff --git a/output_file.go b/output_file.go index fc0965e90..4c863fcdc 100644 --- a/output_file.go +++ b/output_file.go @@ -228,7 +228,7 @@ func (o *FileOutput) String() string { return "File output: " + o.file.Name() } -func (o *FileOutput) Close() { +func (o *FileOutput) Close() error { if o.file != nil { if strings.HasSuffix(o.currentName, ".gz") { o.writer.(*gzip.Writer).Close() @@ -237,4 +237,5 @@ func (o *FileOutput) Close() { } o.file.Close() } + return nil }