mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 09:50:45 +00:00
eth/downloader: make Broadcast run after Wait (#264)
This commit is contained in:
parent
4593951c52
commit
bd3e2600fd
1 changed files with 3 additions and 0 deletions
|
|
@ -146,6 +146,9 @@ func (q *queue) Reset() {
|
||||||
// Close marks the end of the sync, unblocking WaitResults.
|
// Close marks the end of the sync, unblocking WaitResults.
|
||||||
// It may be called even if the queue is already closed.
|
// It may be called even if the queue is already closed.
|
||||||
func (q *queue) Close() {
|
func (q *queue) Close() {
|
||||||
|
q.lock.Lock()
|
||||||
|
defer q.lock.Unlock()
|
||||||
|
|
||||||
q.closed = true
|
q.closed = true
|
||||||
q.active.Broadcast()
|
q.active.Broadcast()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue