RCT: fix retry

This commit is contained in:
andig 2024-03-01 14:03:57 +01:00
parent c21d1a83fb
commit db3f355ab6

View file

@ -174,9 +174,10 @@ func (m *RCT) queryFloat(id rct.Identifier) (float64, error) {
res, err := backoff.RetryWithData(func() (float32, error) {
res, err := m.conn.QueryFloat32(id)
if !errors.Is(err, rct.RecoverableError{}) {
if err != nil && !errors.As(err, new(rct.RecoverableError)) {
err = backoff.Permanent(err)
}
return res, err
}, m.bo)