Close compressor (#491)

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
This commit is contained in:
ledgerwatch 2022-06-14 22:38:18 +01:00 committed by GitHub
parent a450f5c341
commit bbf96d0580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -412,6 +412,7 @@ func (d *Domain) mergeFiles(files [][NumberOfTypes]*filesItem, r DomainRanges, m
if err = comp.Compress(); err != nil {
return outItems, err
}
comp.Close()
comp = nil
if outItem.decompressor, err = compress.NewDecompressor(datPath); err != nil {
return outItems, fmt.Errorf("merge %s remove vals decompressor(no val) %s [%d-%d]: %w", d.filenameBase, fType.String(), startTxNum, endTxNum, err)