From 6b93b3d40cd0031be31fdbc21f2764a8229f4082 Mon Sep 17 00:00:00 2001 From: Zsolt Felfoldi Date: Sun, 17 Mar 2024 08:51:23 +0100 Subject: [PATCH] beacon/light/api: fix event loop exit --- beacon/light/api/light_api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon/light/api/light_api.go b/beacon/light/api/light_api.go index aaa8a81d28..7e5ac38420 100755 --- a/beacon/light/api/light_api.go +++ b/beacon/light/api/light_api.go @@ -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) }