server: don't re-use existing wait group for loops within initialPeerBootstrap
This commit is contained in:
parent
9c957193cf
commit
abe73ca6c1
@ -1719,7 +1719,6 @@ func (s *server) peerBootstrapper(numTargetPeers uint32,
|
|||||||
func (s *server) initialPeerBootstrap(ignore map[autopilot.NodeID]struct{},
|
func (s *server) initialPeerBootstrap(ignore map[autopilot.NodeID]struct{},
|
||||||
numTargetPeers uint32, bootstrappers []discovery.NetworkPeerBootstrapper) {
|
numTargetPeers uint32, bootstrappers []discovery.NetworkPeerBootstrapper) {
|
||||||
|
|
||||||
var wg sync.WaitGroup
|
|
||||||
|
|
||||||
for {
|
for {
|
||||||
// Check if the server has been requested to shut down in order
|
// Check if the server has been requested to shut down in order
|
||||||
@ -1752,6 +1751,7 @@ func (s *server) initialPeerBootstrap(ignore map[autopilot.NodeID]struct{},
|
|||||||
|
|
||||||
// Then, we'll attempt to establish a connection to the
|
// Then, we'll attempt to establish a connection to the
|
||||||
// different peer addresses retrieved by our bootstrappers.
|
// different peer addresses retrieved by our bootstrappers.
|
||||||
|
var wg sync.WaitGroup
|
||||||
for _, bootstrapAddr := range bootstrapAddrs {
|
for _, bootstrapAddr := range bootstrapAddrs {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func(addr *lnwire.NetAddress) {
|
go func(addr *lnwire.NetAddress) {
|
||||||
|
Loading…
Reference in New Issue
Block a user