Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Jun 27, 2024
1 parent d22233c commit 03f9910
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/persistedmap/persistedmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ func (p *PersistedMap) flushRoutine() {
}

func (p *PersistedMap) flush() error {
p.mu.Lock()

if !p.shouldSave {
return nil
}

p.mu.Lock()
defer p.mu.Unlock()

file, err := os.Create(p.filePath)
Expand Down

0 comments on commit 03f9910

Please sign in to comment.