From f1c0e7d7961470030a1a49660b3eca75efdc86bc Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 23 Jul 2025 14:16:06 +0200 Subject: [PATCH] Unlock before purging --- restream/fs/fs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/restream/fs/fs.go b/restream/fs/fs.go index c8d37577..793db9b0 100644 --- a/restream/fs/fs.go +++ b/restream/fs/fs.go @@ -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) }