fix(locks): access to in-memory locks inside scheduled background tasks are now properly guarded

This commit is contained in:
Varakh 2024-04-27 09:13:51 +02:00
parent 10bc3a59bb
commit 927bee30cf

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
} }