Commit 5eefc718 authored by harrylee's avatar harrylee

fix a bug for waitgroup

parent f3eee223
Pipeline #8371 failed with stages
...@@ -130,7 +130,7 @@ func (swarm *Swarm) Start() error { ...@@ -130,7 +130,7 @@ func (swarm *Swarm) Start() error {
// need to connect one other sidecar at least // need to connect one other sidecar at least
wg := &sync.WaitGroup{} wg := &sync.WaitGroup{}
wg.Add(1) wg.Add(len(swarm.Peers()))
for id, addr := range swarm.peers { for id, addr := range swarm.peers {
go func(remoteID string, addr *peer.AddrInfo) { go func(remoteID string, addr *peer.AddrInfo) {
......
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