Merge pull request #20762 from karalabe/fix-txprop-leak
eth: fix transaction announce/broadcast goroutine leak
This commit is contained in:
commit
68b4b74682
@ -157,7 +157,7 @@ func (p *peer) broadcastTransactions() {
|
|||||||
var (
|
var (
|
||||||
queue []common.Hash // Queue of hashes to broadcast as full transactions
|
queue []common.Hash // Queue of hashes to broadcast as full transactions
|
||||||
done chan struct{} // Non-nil if background broadcaster is running
|
done chan struct{} // Non-nil if background broadcaster is running
|
||||||
fail = make(chan error) // Channel used to receive network error
|
fail = make(chan error, 1) // Channel used to receive network error
|
||||||
)
|
)
|
||||||
for {
|
for {
|
||||||
// If there's no in-flight broadcast running, check if a new one is needed
|
// If there's no in-flight broadcast running, check if a new one is needed
|
||||||
@ -219,7 +219,7 @@ func (p *peer) announceTransactions() {
|
|||||||
var (
|
var (
|
||||||
queue []common.Hash // Queue of hashes to announce as transaction stubs
|
queue []common.Hash // Queue of hashes to announce as transaction stubs
|
||||||
done chan struct{} // Non-nil if background announcer is running
|
done chan struct{} // Non-nil if background announcer is running
|
||||||
fail = make(chan error) // Channel used to receive network error
|
fail = make(chan error, 1) // Channel used to receive network error
|
||||||
)
|
)
|
||||||
for {
|
for {
|
||||||
// If there's no in-flight announce running, check if a new one is needed
|
// If there's no in-flight announce running, check if a new one is needed
|
||||||
|
Loading…
Reference in New Issue
Block a user