mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "core/bloombits: fix deadlock when matcher session hits an error (#28184)"
This reverts commit 0e3ba93dba.
This commit is contained in:
parent
9bc056f9d6
commit
de65527e85
1 changed files with 1 additions and 4 deletions
|
|
@ -630,16 +630,13 @@ func (s *MatcherSession) Multiplex(batch int, wait time.Duration, mux chan chan
|
||||||
request <- &Retrieval{Bit: bit, Sections: sections, Context: s.ctx}
|
request <- &Retrieval{Bit: bit, Sections: sections, Context: s.ctx}
|
||||||
|
|
||||||
result := <-request
|
result := <-request
|
||||||
|
|
||||||
// Deliver a result before s.Close() to avoid a deadlock
|
|
||||||
s.deliverSections(result.Bit, result.Sections, result.Bitsets)
|
|
||||||
|
|
||||||
if result.Error != nil {
|
if result.Error != nil {
|
||||||
s.errLock.Lock()
|
s.errLock.Lock()
|
||||||
s.err = result.Error
|
s.err = result.Error
|
||||||
s.errLock.Unlock()
|
s.errLock.Unlock()
|
||||||
s.Close()
|
s.Close()
|
||||||
}
|
}
|
||||||
|
s.deliverSections(result.Bit, result.Sections, result.Bitsets)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue