Skip to content

Commit

Permalink
Exclusive file lock is released prematurely (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
m90 authored Feb 1, 2024
1 parent c3daeac commit 63b5457
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/backup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ func main() {
}

unlock, err := s.lock("/var/lock/dockervolumebackup.lock")
defer s.must(unlock())
defer func() {
s.must(unlock())
}()
s.must(err)

defer func() {
Expand Down

0 comments on commit 63b5457

Please sign in to comment.