fix nLocks (#241)

This commit is contained in:
gohumble 2021-12-26 15:12:18 +01:00 committed by GitHub
parent 07ccc6cc28
commit 35d5ed8d8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,8 +79,9 @@ func UnlockWithContext(ctx context.Context, s string) {
} else {
log.Tracef("[Mutex] Skip unlock (nLocks: %d)", nLocks)
}
mutexMap.Remove(fmt.Sprintf("nLocks:%s", uid))
Unlock(fmt.Sprintf("mutex-sync:%s:%s", s, uid))
mutexMap.Remove(fmt.Sprintf("mutex-sync:%s:%s", s, uid))
//mutexMap.Remove(fmt.Sprintf("mutex-sync:%s:%s", s, uid))
}
// Lock locks a mutex in the mutexMap. If the mutex is already in the map, it locks the current call.