Skip to content

Commit

Permalink
Try to fix multiple head subscriptions (erigontech#1565)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexey Sharp <[email protected]>
  • Loading branch information
2 people authored and sam committed Apr 5, 2021
1 parent 64f001c commit 2ed1487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ethdb/remote/remotedbserver/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (e *Events) OnNewHeader(newHeader *types.Header) {
// remove subscription
if i == len(e.headerSubscriptions)-1 {
e.headerSubscriptions = e.headerSubscriptions[:i]
} else {
} else if i < len(e.headerSubscriptions)-1 {
e.headerSubscriptions = append(e.headerSubscriptions[:i], e.headerSubscriptions[i+1:]...)
}
}
Expand Down

0 comments on commit 2ed1487

Please sign in to comment.