eth/downloader: make Broadcast run after Wait (#264)

This commit is contained in:
Daniel Liu 2023-12-18 10:49:40 +08:00
parent 4593951c52
commit bd3e2600fd

View file

@ -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()
}