Skip to content

Commit

Permalink
les: fix channel assignment data race (ethereum#15441)
Browse files Browse the repository at this point in the history
  • Loading branch information
b00ris authored and fjl committed Nov 9, 2017
1 parent 0914d4e commit 7ace023
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions les/serverpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ func (pool *serverPool) start(server *p2p.Server, topic discv5.Topic) {
pool.wg.Add(1)
pool.loadNodes()

go pool.eventLoop()

pool.checkDial()
if pool.server.DiscV5 != nil {
pool.discSetPeriod = make(chan time.Duration, 1)
pool.discNodes = make(chan *discv5.Node, 100)
pool.discLookups = make(chan bool, 100)
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
Expand Down

0 comments on commit 7ace023

Please sign in to comment.