diff options
author | b00ris <b00ris@mail.ru> | 2017-11-09 17:43:37 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-11-09 17:43:37 +0800 |
commit | 7ace02398160fe4d0f0bf9e7c49ff86e6fdb15bc (patch) | |
tree | 24ed77a7b6ca71fa58a273ee92e653061b9fdf32 /les/serverpool.go | |
parent | 0914d4e0d2b29249bdec9d2342256c39e1787bf3 (diff) | |
download | dexon-7ace02398160fe4d0f0bf9e7c49ff86e6fdb15bc.tar dexon-7ace02398160fe4d0f0bf9e7c49ff86e6fdb15bc.tar.gz dexon-7ace02398160fe4d0f0bf9e7c49ff86e6fdb15bc.tar.bz2 dexon-7ace02398160fe4d0f0bf9e7c49ff86e6fdb15bc.tar.lz dexon-7ace02398160fe4d0f0bf9e7c49ff86e6fdb15bc.tar.xz dexon-7ace02398160fe4d0f0bf9e7c49ff86e6fdb15bc.tar.zst dexon-7ace02398160fe4d0f0bf9e7c49ff86e6fdb15bc.zip |
les: fix channel assignment data race (#15441)
Diffstat (limited to 'les/serverpool.go')
-rw-r--r-- | les/serverpool.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/les/serverpool.go b/les/serverpool.go index f4e4df2fb..dc1ea6bf0 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 |