mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
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:
parent
974d32412f
commit
360e7b7071
1 changed files with 1 additions and 9 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue