eth/filters: use buffered channel to avoid goroutine leak (#24928)

This commit is contained in:
Boqin Qin(秦 伯钦)
2022-05-30 20:35:37 +02:00
committed by GitHub
parent 2140aabf53
commit 03157b6efa
+1 -1
View File
@@ -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)