diff --git a/block/synctarget.go b/block/synctarget.go index dfccf3fd5..a7f81b457 100644 --- a/block/synctarget.go +++ b/block/synctarget.go @@ -41,7 +41,8 @@ func (m *Manager) SyncTargetLoop(ctx context.Context) { // TODO(omritoptix): Check if we are the aggregator m.batchInProcess.Store(false) case <-subscription.Cancelled(): - m.logger.Info("Subscription canceled") + m.logger.Info("syncTargetLoop subscription canceled") + return } } } diff --git a/settlement/base.go b/settlement/base.go index b35af7a05..c6dc4b5bc 100644 --- a/settlement/base.go +++ b/settlement/base.go @@ -179,7 +179,7 @@ func (b *BaseLayerClient) stateUpdatesHandler(ready chan bool) { utils.SubmitEventOrPanic(b.ctx, b.pubsub, newBatchEventData, map[string][]string{EventTypeKey: {EventNewBatchAccepted}}) case <-subscription.Cancelled(): - b.logger.Info("subscription canceled") + b.logger.Info("stateUpdatesHandler subscription canceled") return case <-b.ctx.Done(): b.logger.Info("Context done. Exiting state update handler") diff --git a/utils/events.go b/utils/events.go index 2a1953091..89a053173 100644 --- a/utils/events.go +++ b/utils/events.go @@ -22,7 +22,8 @@ func SubscribeAndHandleEvents(ctx context.Context, pubsubServer *pubsub.Server, case event := <-subscription.Out(): callback(event) case <-subscription.Cancelled(): - logger.Info("Subscription canceled") + logger.Info(clientID + " subscription canceled") + return } } }