mirror of
https://github.com/offen/docker-volume-backup.git
synced 2025-10-01 19:04:19 +08:00
Exclusive file lock is released prematurely (#339)
This commit is contained in:
parent
c3daeacecb
commit
63b545787e
1 changed files with 3 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue