From 03157b6efac04a197f27496d211d4c7c71ac95a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boqin=20Qin=28=E7=A7=A6=20=E4=BC=AF=E9=92=A6=29?= Date: Tue, 31 May 2022 02:35:37 +0800 Subject: [PATCH] eth/filters: use buffered channel to avoid goroutine leak (#24928) --- eth/filters/filter_system_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/filters/filter_system_test.go b/eth/filters/filter_system_test.go index 87971d5a9..8d145d960 100644 --- a/eth/filters/filter_system_test.go +++ b/eth/filters/filter_system_test.go @@ -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)