Do not close *lock.LockedFile on failure (#5565)

master
Krishnan Parthasarathi 7 years ago committed by kannappanr
parent 0ea54c9858
commit e5e3d17216
  1. 1
      cmd/format-fs.go

@ -238,7 +238,6 @@ func initFormatFS(fsPath string) (rlk *lock.RLockedFile, err error) {
wlk, err := lock.TryLockedOpenFile(fsFormatPath, os.O_RDWR, 0)
if err == lock.ErrAlreadyLocked {
// Lock already present, sleep and attempt again.
wlk.Close()
time.Sleep(100 * time.Millisecond)
continue
}

Loading…
Cancel
Save