Hello! I'm chasing down a problem in some remotely-deployed embedded engine code that uses gobrake to upload errors to airbrake. I'm not sure that it's related to our problem, but I just started a dive into the backlog capabilities added in v5.6.0 and the following code caught my eye - is this for loop intended to loop forever? I would (naively) expect it to wait for the backlog period, flush, and then exit.
Thank you!
Brian
// setNoticeBacklog sets new backlog notice.
func setNoticeBacklog(notice *Notice) {
if nb.opt.DisableBacklog {
return
}
if len(nb.notices) < nb.maxLength {
nb.notices = append(nb.notices, *notice)
}
for {
<-time.After(flushBacklogPeriod)
nb.flushNoticeBacklog()
}
}
Hello! I'm chasing down a problem in some remotely-deployed embedded engine code that uses gobrake to upload errors to airbrake. I'm not sure that it's related to our problem, but I just started a dive into the backlog capabilities added in v5.6.0 and the following code caught my eye - is this
for
loop intended to loop forever? I would (naively) expect it to wait for the backlog period, flush, and then exit.Thank you! Brian