diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index fca2e54875..2a093f075b 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -146,6 +146,9 @@ func (q *queue) Reset() { // Close marks the end of the sync, unblocking WaitResults. // It may be called even if the queue is already closed. func (q *queue) Close() { + q.lock.Lock() + defer q.lock.Unlock() + q.closed = true q.active.Broadcast() }