Skip to content

Commit

Permalink
RCT: fix retry
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Mar 1, 2024
1 parent c21d1a8 commit db3f355
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meter/rct.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit db3f355

Please sign in to comment.