diff --git a/packer/plugin/client.go b/packer/plugin/client.go index 6890875f7..c81159a84 100644 --- a/packer/plugin/client.go +++ b/packer/plugin/client.go @@ -67,10 +67,10 @@ func CleanupClients() { for _, client := range managedClients { wg.Add(1) - go func() { + go func(client *Client) { client.Kill() wg.Done() - }() + }(client) } log.Println("waiting for all plugin processes to complete...")