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

This commit is contained in:
Boqin Qin(秦 伯钦) 2022-05-31 02:35:37 +08:00 committed by GitHub
parent 2140aabf53
commit 03157b6efa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)