prevent leaking any blocked goroutines on error

This commit is contained in:
Jason Lunz 2021-12-20 13:33:13 -07:00
parent 932c9da473
commit 38eb894d73
No known key found for this signature in database
GPG key ID: C3EB59E26C4EE4F3

View file

@ -199,7 +199,7 @@ func (a *App) printOpenSSHConfig(ctx context.Context, opts configOptions, execut
err error
}
sshUsers := make(chan sshResult)
sshUsers := make(chan sshResult, len(csList))
var wg sync.WaitGroup
var status error
for _, cs := range csList {