mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-29 17:58:15 +08:00
Don't return nil, nil in (*AuditWriter).tryResumeStream (#10254)
* Fix logic problem in (*AuditWriter).tryResumeStream If all the attempts are discarded due to timeouts with no errors we might return nil, nil in tryResumeStream, this adds a message to the potentially nil error that makes it an actual error. * Use `LimitExceeded` instead of wrapping the error
This commit is contained in:
@@ -533,7 +533,7 @@ func (a *AuditWriter) tryResumeStream() (apievents.Stream, error) {
|
||||
return nil, trace.ConnectionProblem(a.closeCtx.Err(), "operation has been canceled")
|
||||
}
|
||||
}
|
||||
return nil, trace.Wrap(err)
|
||||
return nil, trace.LimitExceeded("audit stream resume attempts exhausted, last error: %v", err)
|
||||
}
|
||||
|
||||
func (a *AuditWriter) updateStatus(status apievents.StreamStatus) {
|
||||
|
||||
Reference in New Issue
Block a user