mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 19:46:39 +00:00
eth/filters: fix early Unsubscribe of log events (#28769)
This commit is contained in:
parent
07b17f991b
commit
e7fa158086
1 changed files with 1 additions and 1 deletions
|
|
@ -266,9 +266,9 @@ func (api *FilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc.Subsc
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer logsSub.Unsubscribe()
|
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
defer logsSub.Unsubscribe()
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case logs := <-matchedLogs:
|
case logs := <-matchedLogs:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue