mirror of
https://github.com/Icinga/icingadb.git
synced 2026-06-09 08:56:54 -04:00
Merge pull request #741 from Icinga/icingadb-driver-shouldretry
icingadb: Remove shouldRetry
This commit is contained in:
commit
109372f2e9
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