Unlock before purging
This commit is contained in:
parent
46810bf64d
commit
f1c0e7d796
@ -133,7 +133,6 @@ func (rfs *filesystem) UpdateCleanup(id string, newPatterns []Pattern, purge boo
|
||||
newPatterns = rfs.compilePatterns(newPatterns)
|
||||
|
||||
rfs.cleanupLock.Lock()
|
||||
defer rfs.cleanupLock.Unlock()
|
||||
|
||||
currentPatterns := rfs.cleanupPatterns[id]
|
||||
delete(rfs.cleanupPatterns, id)
|
||||
@ -176,6 +175,8 @@ func (rfs *filesystem) UpdateCleanup(id string, newPatterns []Pattern, purge boo
|
||||
}).Log("Remove pattern")
|
||||
}
|
||||
|
||||
rfs.cleanupLock.Unlock()
|
||||
|
||||
if purge {
|
||||
rfs.purge(onlyCurrent)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user