Merge pull request #741 from Icinga/icingadb-driver-shouldretry

icingadb: Remove shouldRetry
This commit is contained in:
Julian Brost 2024-04-11 11:58:12 +02:00 committed by GitHub
commit 109372f2e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,
@ -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)
}