Skip to content

Commit eb0e9d0

Browse files
committed
eth/filters/api.go : unsubscribe fix
1 parent 877d094 commit eb0e9d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/filters/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ func (api *FilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc.Subsc
266266
if err != nil {
267267
return nil, err
268268
}
269-
defer logsSub.Unsubscribe()
270269

271270
go func() {
271+
defer logsSub.Unsubscribe()
272272
for {
273273
select {
274274
case logs := <-matchedLogs:

0 commit comments

Comments
 (0)