Skip to content

Commit 131e248

Browse files
committed
fix: goroutine leak
1 parent 73bbd26 commit 131e248

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

p2p/conns.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,14 @@ func (c *Conns) BroadcastTxHashes(hashes []common.Hash) int {
192192

193193
count := 0
194194
for _, cn := range peers {
195+
// Non-blocking send, drop if queue full (matches Bor behavior)
195196
select {
196197
case cn.txAnnounce <- hashes:
197198
count++
198199
case <-cn.closeCh:
199200
// Peer closing, skip
201+
default:
202+
// Channel full, skip to avoid goroutine leak
200203
}
201204
}
202205

0 commit comments

Comments
 (0)