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{}{}
|
f.doneCh <- struct{}{}
|
||||||
close(f.purgeCh)
|
close(f.purgeCh)
|
||||||
f.closed = true
|
f.closed = true
|
||||||
|
f.currentFile.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue