diff --git a/internal/events/event_manager.go b/internal/events/event_manager.go index 46f9414f9..6d3b84fa6 100644 --- a/internal/events/event_manager.go +++ b/internal/events/event_manager.go @@ -202,7 +202,9 @@ func (em *eventManager) WaitStop() { em.blobReceiver.stop() em.blobReceiver = nil } - <-em.aggregator.eventPoller.closed + if em.aggregator != nil { + <-em.aggregator.eventPoller.closed + } } func (em *eventManager) CreateUpdateDurableSubscription(ctx context.Context, subDef *core.Subscription, mustNew bool) (err error) {