mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
beacon/light/api: fixed double stream.Close()
This commit is contained in:
parent
40cc83f4a1
commit
766869ce39
1 changed files with 0 additions and 3 deletions
|
|
@ -494,9 +494,6 @@ func (api *BeaconLightApi) StartHeadListener(listener HeadEventListener) func()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
|
||||||
stream.Close()
|
|
||||||
|
|
||||||
case event, ok := <-stream.Events:
|
case event, ok := <-stream.Events:
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Trace("Event stream closed")
|
log.Trace("Event stream closed")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue