Skip to content

Commit

Permalink
sync one last time on close of pager
Browse files Browse the repository at this point in the history
  • Loading branch information
guycipher committed Dec 24, 2024
1 parent 9f72880 commit 44b4b2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pager.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ func (p *Pager) Close() error {
// close the exit channel
close(p.exit)
p.wg.Wait() // wait for the sync goroutine to finish

// sync one last time
p.file.Sync()

// write the deleted pages to the file
p.writeDelPages()
return p.file.Close()
Expand Down

0 comments on commit 44b4b2f

Please sign in to comment.