From e7d0dfbc8bcd5a7b08b75b7bce1a54987d93b0b6 Mon Sep 17 00:00:00 2001 From: James Rasell Date: Wed, 16 Mar 2022 09:42:57 +0100 Subject: [PATCH] client: avoid double group lookup within groupservice hook setup. --- client/allocrunner/groupservice_hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/allocrunner/groupservice_hook.go b/client/allocrunner/groupservice_hook.go index 69eae41e8..87bf8ba91 100644 --- a/client/allocrunner/groupservice_hook.go +++ b/client/allocrunner/groupservice_hook.go @@ -78,7 +78,7 @@ func newGroupServiceHook(cfg groupServiceHookConfig) *groupServiceHook { delay: shutdownDelay, networkStatusGetter: cfg.networkStatusGetter, logger: cfg.logger.Named(groupServiceHookName), - services: cfg.alloc.Job.LookupTaskGroup(cfg.alloc.TaskGroup).Services, + services: tg.Services, shutdownDelayCtx: cfg.shutdownDelayCtx, }