Skip to content

Commit

Permalink
Do not close *lock.LockedFile on failure (minio#5565)
Browse files Browse the repository at this point in the history
  • Loading branch information
krisis authored and kannappanr committed Feb 21, 2018
1 parent 0ea54c9 commit e5e3d17
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion cmd/format-fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e5e3d17

Please sign in to comment.