mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
beacon/light/api: fix event loop exit
This commit is contained in:
parent
cbe5e67679
commit
6b93b3d40c
1 changed files with 2 additions and 2 deletions
|
|
@ -467,7 +467,7 @@ func (api *BeaconLightApi) StartHeadListener(listener HeadEventListener) func()
|
|||
select {
|
||||
case event, ok := <-stream.Events:
|
||||
if !ok {
|
||||
break
|
||||
return
|
||||
}
|
||||
switch event.Event() {
|
||||
case "head":
|
||||
|
|
@ -493,7 +493,7 @@ func (api *BeaconLightApi) StartHeadListener(listener HeadEventListener) func()
|
|||
}
|
||||
case err, ok := <-stream.Errors:
|
||||
if !ok {
|
||||
break
|
||||
return
|
||||
}
|
||||
listener.OnError(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue