fix(locks): access to in-memory locks inside scheduled background tasks are now properly guarded
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
Varakh 2024-04-27 09:13:51 +02:00
parent 678da51dc0
commit 59c217b666

View file

@ -63,7 +63,9 @@ func (l *InMemoryLockRegistry) Clear() {
// Exists exists a lock by name // Exists exists a lock by name
func (l *InMemoryLockRegistry) Exists(name string) bool { func (l *InMemoryLockRegistry) Exists(name string) bool {
l.mu.Lock()
_, exists := l.locks[name] _, exists := l.locks[name]
l.mu.Unlock()
return exists return exists
} }