Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
add reader close to Stop()
Browse files Browse the repository at this point in the history
  • Loading branch information
rockb1017 committed Jun 7, 2021
1 parent 2d49e7c commit e9112de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions operator/builtin/input/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ func (f *InputOperator) Start(persister operator.Persister) error {
func (f *InputOperator) Stop() error {
f.cancel()
f.wg.Wait()
for _, reader := range f.lastPollReaders {
reader.Close()
}
for _, reader := range f.knownFiles {
reader.Close()
}
f.knownFiles = nil
f.cancel = nil
return nil
Expand Down

0 comments on commit e9112de

Please sign in to comment.