Skip to content

Commit

Permalink
fix: Resolve potential crash when no endpoints are available to publi…
Browse files Browse the repository at this point in the history
…sh to
  • Loading branch information
driskell committed Feb 26, 2024
1 parent 7093cdf commit 463ed63
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lc-lib/publisher/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,10 @@ func (p *Publisher) sendPayload(pendingPayload *payload.Payload) (*endpoint.Endp
p.forceEndpointFailure(endpoint, err)
return nil, false
}
if endpoint == nil {
// No endpoints available
return nil, false
}

// If this is the first payload, start the network timeout
if endpoint.NumPending() == 1 {
Expand Down

0 comments on commit 463ed63

Please sign in to comment.