From c1b66fe0cc23202443f6312a44df7081672411e4 Mon Sep 17 00:00:00 2001 From: Nishant Das Date: Fri, 27 Sep 2024 17:09:45 +0800 Subject: [PATCH] Put Subscriber in Goroutine (#14486) --- beacon-chain/sync/subscriber.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beacon-chain/sync/subscriber.go b/beacon-chain/sync/subscriber.go index ba1785c53549..3c42d9ca1790 100644 --- a/beacon-chain/sync/subscriber.go +++ b/beacon-chain/sync/subscriber.go @@ -698,10 +698,10 @@ func (s *Service) subscribeDynamicWithSyncSubnets( // Retrieve the current slot. currentSlot := s.cfg.clock.CurrentSlot() - // Subscribe to the sync subnets. - s.subscribeToSyncSubnets(topicFormat, digest, genesisValidatorsRoot, genesisTime, subscriptions, currentSlot, validate, handle) - go func() { + // Subscribe to the sync subnets. + s.subscribeToSyncSubnets(topicFormat, digest, genesisValidatorsRoot, genesisTime, subscriptions, currentSlot, validate, handle) + for { select { case currentSlot := <-ticker.C():