etl: collector.close nil ptr fix (#1003)

This commit is contained in:
Alex Sharov 2023-06-01 16:00:00 +07:00 committed by GitHub
parent c7c31ee01f
commit f1e19f0712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,10 +239,12 @@ func (c *Collector) Load(db kv.RwTx, toBucket string, loadFunc LoadFunc, args Tr
}
func (c *Collector) reset() {
if c.dataProviders != nil {
for _, p := range c.dataProviders {
p.Dispose()
}
c.dataProviders = nil
}
c.buf.Reset()
c.allFlushed = false
}