icingadb: Remove shouldRetry

The additional check against a driver.ErrBadConn is now also part of
retry.Retryable. Thus, it can be dropped.
This commit is contained in:
Alvar Penning 2024-04-11 11:05:06 +02:00
parent 974d32412f
commit 360e7b7071
No known key found for this signature in database

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