Fix deadlock on UnlockRelease

Locking release map is not needed in UnlockRelease as the goroutine
releasing the lock must first acquire it.

More importantly it resulted in deadlocks, which got investigated by
Justin Scott (justin.a.scott@intel.com).
pull/2712/head
Maciej Kwiek 8 years ago
parent 8fc88ab626
commit 8f68e7c437

@ -193,8 +193,6 @@ func (s *Storage) LockRelease(name string) error {
// If release doesn't exist or wasn't previously locked - the unlock will pass
func (s *Storage) UnlockRelease(name string) {
s.Log("unlocking release %s", name)
s.releaseLocksLock.Lock()
defer s.releaseLocksLock.Unlock()
var lock *sync.Mutex
lock, exists := s.releaseLocks[name]

Loading…
Cancel
Save