Skip to content

Commit 6da0867

Browse files
committed
Do not use goroutine if RunParallel is false.
1 parent 62eea0b commit 6da0867

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ func runPhase(setup *setup, phaseName string, phase nodeData) {
4545
var wgToUse *sync.WaitGroup = nil
4646
if phase.RunParallel {
4747
wgToUse = &wg
48+
go runCommand(wgToUse, ind, phase, c)
49+
} else {
50+
runCommand(wgToUse, ind, phase, c)
4851
}
49-
50-
go runCommand(wgToUse, ind, phase, c)
5152
}
5253

5354
if phase.RunParallel {

0 commit comments

Comments
 (0)