mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 03:26:38 +00:00
les: fix channel assignment data race (#15441)
This commit is contained in:
parent
0914d4e0d2
commit
7ace023981
1 changed files with 3 additions and 3 deletions
|
|
@ -145,15 +145,15 @@ func (pool *serverPool) start(server *p2p.Server, topic discv5.Topic) {
|
||||||
pool.wg.Add(1)
|
pool.wg.Add(1)
|
||||||
pool.loadNodes()
|
pool.loadNodes()
|
||||||
|
|
||||||
go pool.eventLoop()
|
|
||||||
|
|
||||||
pool.checkDial()
|
|
||||||
if pool.server.DiscV5 != nil {
|
if pool.server.DiscV5 != nil {
|
||||||
pool.discSetPeriod = make(chan time.Duration, 1)
|
pool.discSetPeriod = make(chan time.Duration, 1)
|
||||||
pool.discNodes = make(chan *discv5.Node, 100)
|
pool.discNodes = make(chan *discv5.Node, 100)
|
||||||
pool.discLookups = make(chan bool, 100)
|
pool.discLookups = make(chan bool, 100)
|
||||||
go pool.server.DiscV5.SearchTopic(pool.topic, pool.discSetPeriod, pool.discNodes, pool.discLookups)
|
go pool.server.DiscV5.SearchTopic(pool.topic, pool.discSetPeriod, pool.discNodes, pool.discLookups)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
go pool.eventLoop()
|
||||||
|
pool.checkDial()
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect should be called upon any incoming connection. If the connection has been
|
// connect should be called upon any incoming connection. If the connection has been
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue