mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-11 09:21:37 +00:00
eth: fix transaction announce/broadcast goroutine leak
This commit is contained in:
parent
92f3405dae
commit
270fbfba4b
1 changed files with 6 additions and 6 deletions
|
|
@ -157,7 +157,7 @@ func (p *peer) broadcastTransactions() {
|
|||
var (
|
||||
queue []common.Hash // Queue of hashes to broadcast as full transactions
|
||||
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 {
|
||||
// If there's no in-flight broadcast running, check if a new one is needed
|
||||
|
|
@ -219,7 +219,7 @@ func (p *peer) announceTransactions() {
|
|||
var (
|
||||
queue []common.Hash // Queue of hashes to announce as transaction stubs
|
||||
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 {
|
||||
// If there's no in-flight announce running, check if a new one is needed
|
||||
|
|
|
|||
Loading…
Reference in a new issue