Merge pull request #323 from gzliudan/fix-issue-264

fix issue #264: private network halts randomly
This commit is contained in:
Liam 2023-12-18 15:58:46 +11:00 committed by GitHub
commit d249d30201
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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