From 7ace02398160fe4d0f0bf9e7c49ff86e6fdb15bc Mon Sep 17 00:00:00 2001 From: b00ris Date: Thu, 9 Nov 2017 12:43:37 +0300 Subject: [PATCH] les: fix channel assignment data race (#15441) --- les/serverpool.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/les/serverpool.go b/les/serverpool.go index f4e4df2fbf..dc1ea6bf02 100644 --- a/les/serverpool.go +++ b/les/serverpool.go @@ -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