Skip to content

Commit

Permalink
fix: log error for dequeue error, do not panic
Browse files Browse the repository at this point in the history
Signed-off-by: Shivanjan Chakravorty <[email protected]>
  • Loading branch information
Glitchfix committed Mar 28, 2023
1 parent 4f47a72 commit 4acfef0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pipeline/senders/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ func (rs *RetryingSender) maybeSend(now time.Time) {
// In either scenario, the report is removed from the queue and the retry delay is reset.
if poperr := rs.queue.Dequeue(nil); poperr != nil {
// We failed to pop the sent entry off the queue. This isn't recoverable.
panic("RetryingSender.maybeSend: dequeuing from retry queue: " + poperr.Error())
glog.Errorf("RetryingSender.maybeSend: dequeuing from retry queue: " + poperr.Error() + " we've either successfully sent the report or encountered a non-transient error")
return
}

rs.lastAttempt = now
Expand Down

0 comments on commit 4acfef0

Please sign in to comment.