exit data update tracker only upon context completion (#10594)

The data update tracker saver would exit if data wasn't updated for between cycles.
This commit is contained in:
Klaus Post 2020-09-29 13:23:53 -07:00 committed by GitHub
parent 00eb6f6bc9
commit fdf0ae9167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,7 +236,10 @@ func (d *dataUpdateTracker) startSaver(ctx context.Context, interval time.Durati
d.mu.Lock()
if !d.dirty {
d.mu.Unlock()
return
if exit {
return
}
continue
}
d.Saved = UTCNow()
err := d.serialize(&buf)