Skip to content

Commit

Permalink
Merge pull request #741 from Icinga/icingadb-driver-shouldretry
Browse files Browse the repository at this point in the history
icingadb: Remove shouldRetry
  • Loading branch information
julianbrost authored Apr 11, 2024
2 parents 974d324 + 360e7b7 commit 109372f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/icingadb/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (c RetryConnector) Connect(ctx context.Context) (driver.Conn, error) {

return
},
shouldRetry,
retry.Retryable,
backoff.NewExponentialWithJitter(time.Millisecond*128, time.Minute*1),
retry.Settings{
Timeout: retry.DefaultTimeout,
Expand Down Expand Up @@ -88,11 +88,3 @@ type MysqlFuncLogger func(v ...interface{})
func (log MysqlFuncLogger) Print(v ...interface{}) {
log(v)
}

func shouldRetry(err error) bool {
if errors.Is(err, driver.ErrBadConn) {
return true
}

return retry.Retryable(err)
}

0 comments on commit 109372f

Please sign in to comment.