Skip to content

Commit

Permalink
eth/filters: fix early Unsubscribe of log events (#28769)
Browse files Browse the repository at this point in the history
  • Loading branch information
ucwong authored Jan 8, 2024
1 parent 07b17f9 commit e7fa158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/filters/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e7fa158

Please sign in to comment.