We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 134c047 commit 0efa2d2Copy full SHA for 0efa2d2
client/client.go
@@ -575,15 +575,11 @@ func (c *Client) Shutdown() error {
575
}
576
} else {
577
// In normal mode call shutdown
578
- wg := sync.WaitGroup{}
+ arGroup := group{}
579
for _, ar := range c.getAllocRunners() {
580
- wg.Add(1)
581
- go func(ar AllocRunner) {
582
- ar.Shutdown()
583
- wg.Done()
584
- }(ar)
+ arGroup.Go(ar.Shutdown)
585
586
- wg.Wait()
+ arGroup.Wait()
587
588
589
c.shutdown = true
0 commit comments