close file handle when FileRotator object will closed. Fixes https://github.com/hashicorp/nomad/issues/6309 (#6323)
This commit is contained in:
parent
a6ef8c5d42
commit
b3c72d1729
|
@ -256,6 +256,7 @@ func (f *FileRotator) Close() error {
|
|||
f.doneCh <- struct{}{}
|
||||
close(f.purgeCh)
|
||||
f.closed = true
|
||||
f.currentFile.Close()
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue