Skip to content

Commit

Permalink
eth/filters: fix early Unsubscribe of log events (ethereum#28769)
Browse files Browse the repository at this point in the history
  • Loading branch information
ucwong authored and Roberto Bayardo committed Apr 2, 2024
1 parent e173e67 commit 4c1766c
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 4c1766c

Please sign in to comment.