Commit f0357dbc authored by Steven Allen's avatar Steven Allen

autobatch: fix flush on close

parent 301890e7
......@@ -128,5 +128,13 @@ func (d *Datastore) DiskUsage() (uint64, error) {
}
func (d *Datastore) Close() error {
return d.child.Close()
err1 := d.Flush()
err2 := d.child.Close()
if err1 != nil {
return err1
}
if err2 != nil {
return err2
}
return nil
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment