Fix calling range variable from goroutine

parent 9ecbb0ae
......@@ -80,6 +80,7 @@ func (cm *chaosmonkey) Do() {
stopCh := make(chan struct{})
for _, test := range cm.tests {
test := test
sem := newSemaphore(stopCh)
sems = append(sems, sem)
go func() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment