diff --git a/api/agent/lb_agent.go b/api/agent/lb_agent.go index be14ce5c1..77cf605cb 100644 --- a/api/agent/lb_agent.go +++ b/api/agent/lb_agent.go @@ -136,6 +136,7 @@ func (a *lbAgent) Close() error { ctx, cancel := context.WithTimeout(context.Background(), runnerPoolShutdownTimeout) defer cancel() + close(a.shutdown) a.rp.Shutdown(ctx) err := a.delegatedAgent.Close() a.wg.Wait()