package notify import "errors" // Reset control bypasses record receive backpressure. Keep the typed cause in // that message as well as the in-band error frame used by older peers. func (s *streamHandle) recordResetFailure() *RecordFailure { if s.Channel() != StreamRecordChannel { return nil } var failure RecordFailure if errors.As(s.resetErrSnapshot(), &failure) { return &failure } return nil } func (r StreamResetRequest) resetError(channel StreamChannel) error { if channel == StreamRecordChannel && r.RecordFailure != nil { return *r.RecordFailure } return streamRemoteResetError(r.Error) }