From 5e8fab11323bca3536315a98178c3d4314047f77 Mon Sep 17 00:00:00 2001 From: Peter Ebden Date: Fri, 11 Oct 2024 11:01:01 +0100 Subject: [PATCH] Require building tasks to complete before shutdown (#3275) * Require building tasks to complete before we shut down the cache * ok --- src/plz/plz.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plz/plz.go b/src/plz/plz.go index 223ac7b65..fac5e036f 100644 --- a/src/plz/plz.go +++ b/src/plz/plz.go @@ -59,7 +59,9 @@ func Run(targets, preTargets []core.BuildLabel, state *core.BuildState, config * }() go func() { for task := range actions { + wg.Add(1) go func(task core.Task) { + defer wg.Done() remote := anyRemote && !task.Target.Local if remote { remoteLimiter.Acquire()