mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-10 08:55:45 +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…
Reference in a new issue