Skip to content

Commit

Permalink
eth/filters: use buffered channel to avoid goroutine leak (ethereum#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
BurtonQin authored and brilliant-lx committed Oct 28, 2022
1 parent f863682 commit 0e17e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/filters/filter_system_test.go
Expand Up @@ -592,7 +592,7 @@ func TestPendingLogsSubscription(t *testing.T) {
// (some) events are posted.
for i := range testCases {
testCases[i].c = make(chan []*types.Log)
testCases[i].err = make(chan error)
testCases[i].err = make(chan error, 1)

var err error
testCases[i].sub, err = api.events.SubscribeLogs(testCases[i].crit, testCases[i].c)
Expand Down

0 comments on commit 0e17e62

Please sign in to comment.