From d93cfc7564e73ab9f55a251236e53c1c91426dea Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 15 Jul 2025 15:32:51 +0200 Subject: [PATCH] Lock newly created task to avoid simultaneous access --- restream/core.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/restream/core.go b/restream/core.go index 270b66c8..73a8f282 100644 --- a/restream/core.go +++ b/restream/core.go @@ -1236,6 +1236,9 @@ func (r *restream) updateProcess(task *task, config *app.Config) error { return fmt.Errorf("delete process: %w", err) } + t.Lock() + defer t.Unlock() + r.tasks.Store(tid, t) // set filesystem cleanup rules