diff --git a/apps/eventsub/internal/manager/manager.go b/apps/eventsub/internal/manager/manager.go index 89be5957a..7788f49dc 100644 --- a/apps/eventsub/internal/manager/manager.go +++ b/apps/eventsub/internal/manager/manager.go @@ -136,7 +136,6 @@ func NewManager(opts Opts) (*Manager, error) { } startDistributedLock.Lock() - defer startDistributedLock.Unlock() channelsWg := sync.WaitGroup{} @@ -176,6 +175,7 @@ func NewManager(opts Opts) (*Manager, error) { ) channelsWg.Wait() + startDistributedLock.Unlock() }() return nil diff --git a/apps/eventsub/internal/manager/subscribe.go b/apps/eventsub/internal/manager/subscribe.go index 15c7dd263..59ea4a0bc 100644 --- a/apps/eventsub/internal/manager/subscribe.go +++ b/apps/eventsub/internal/manager/subscribe.go @@ -30,6 +30,10 @@ func (c *Manager) SubscribeWithLimits( return true } + if errors.Is(err, context.DeadlineExceeded) { + return true + } + return false }, ),