eth/filters: fix early Unsubscribe of log events (#28769)

This commit is contained in:
ucwong authored and GitHub committed 2024-01-08 20:18:30 +01:00
1 parent 07b17f991b
commit e7fa158086
1 file changed
+1 -1
+1 -1
View File
@@ -266,9 +266,9 @@ func (api *FilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc.Subsc
if err != nil {
return nil, err
}
defer logsSub.Unsubscribe()
go func() {
defer logsSub.Unsubscribe()
for {
select {
case logs := <-matchedLogs: