dont compare for retry errors
This commit is contained in:
parent
0e12d273af
commit
8b8fdb7d99
1 changed files with 1 additions and 2 deletions
3
retry.go
3
retry.go
|
@ -20,7 +20,6 @@ package realis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"strings"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/paypal/gorealis/gen-go/apache/aurora"
|
"github.com/paypal/gorealis/gen-go/apache/aurora"
|
||||||
|
@ -72,7 +71,7 @@ func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error {
|
||||||
// If Error is retyable return resp and RetryConnErr error.
|
// If Error is retyable return resp and RetryConnErr error.
|
||||||
func CheckAndRetryConn(r Realis, auroraCall AuroraThriftCall) (*aurora.Response, error) {
|
func CheckAndRetryConn(r Realis, auroraCall AuroraThriftCall) (*aurora.Response, error) {
|
||||||
resp, cliErr := auroraCall()
|
resp, cliErr := auroraCall()
|
||||||
if cliErr != nil && (strings.Contains(cliErr.Error(), ConnRefusedErr) || strings.Contains(cliErr.Error(), NoLeaderFoundErr)) {
|
if cliErr != nil /*&& (strings.Contains(cliErr.Error(), ConnRefusedErr) || strings.Contains(cliErr.Error(), NoLeaderFoundErr))*/ {
|
||||||
r.ReestablishConn()
|
r.ReestablishConn()
|
||||||
return resp, RetryConnErr
|
return resp, RetryConnErr
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue