From 060e2c02bb7aa1912e3a477465ebea735dbad26e Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Wed, 29 Jan 2020 13:33:05 +0100 Subject: [PATCH] downloader/queue: fix remaining lock flaw --- eth/downloader/queue.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 0e033482af..8399c4667d 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -847,7 +847,6 @@ func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header, i++ } - q.lock.Lock() var acceptCount = 0 for _, header := range request.Headers[:i] { if res, stale, err := q.resultCache.GetDeliverySlot(header.Number.Uint64()); err == nil { @@ -871,7 +870,6 @@ func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header, if acceptCount > 0 { q.active.Signal() } - q.lock.Unlock() // If none of the data was good, it's a stale delivery switch { case failure == nil || failure == errInvalidChain: