Skip to content

Commit

Permalink
fix(eventsub): retry deadline subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed May 31, 2024
1 parent 0ca65b9 commit 1a7e8ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/eventsub/internal/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ func NewManager(opts Opts) (*Manager, error) {
}

startDistributedLock.Lock()
defer startDistributedLock.Unlock()

channelsWg := sync.WaitGroup{}

Expand Down Expand Up @@ -176,6 +175,7 @@ func NewManager(opts Opts) (*Manager, error) {
)

channelsWg.Wait()
startDistributedLock.Unlock()
}()

return nil
Expand Down
4 changes: 4 additions & 0 deletions apps/eventsub/internal/manager/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ func (c *Manager) SubscribeWithLimits(
return true
}

if errors.Is(err, context.DeadlineExceeded) {
return true
}

return false
},
),
Expand Down

0 comments on commit 1a7e8ee

Please sign in to comment.