Skip to content

Commit

Permalink
fix: Fix a rare race in publisher for immediately failing reconnectio…
Browse files Browse the repository at this point in the history
…ns that can cause high CPU and pipeline freeze
  • Loading branch information
driskell committed Jul 30, 2024
1 parent 3553db5 commit e3aacc8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lc-lib/publisher/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,14 +418,10 @@ func (p *Publisher) eventsHeld() bool {

// tryQueueHeld attempts to queue held payloads
func (p *Publisher) tryQueueHeld() bool {
if !p.eventsHeld() || !p.endpointSink.CanQueue() {
return false
}

if p.resendList.Len() > 0 {
didSend := false

for p.resendList.Len() > 0 {
for p.resendList.Len() > 0 && p.endpointSink.CanQueue() {
pendingPayload := p.resendList.Front().Value.(*payload.Payload)

// We have a payload to resend, send it now
Expand Down

0 comments on commit e3aacc8

Please sign in to comment.