File tree 1 file changed +14
-17
lines changed
1 file changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -88,24 +88,21 @@ func (r *Request) RestyRequest() *restyRequest {
88
88
}
89
89
if r .RetryCount > 0 {
90
90
r .Client .SetRetryCount (r .RetryCount )
91
- } else {
92
- r .Client .SetRetryCount (DefaultRetryCount )
93
- }
94
- if r .RetryWaitTime > 0 {
95
- r .Client .SetRetryWaitTime (r .RetryWaitTime )
96
- } else {
97
- r .Client .SetRetryWaitTime (DefaultRetryWaitTime )
98
- }
99
- r .Client .AddRetryCondition (func (r * resty.Response , err error ) bool {
100
- if r .IsError () {
101
- return true
102
- }
103
- if err != nil {
104
- //sentry.CaptureException(errors.Errorf("%s,error:%s", "retry", err.Error()))
105
- return true
91
+ if r .RetryWaitTime > 0 {
92
+ r .Client .SetRetryWaitTime (r .RetryWaitTime )
93
+ } else {
94
+ r .Client .SetRetryWaitTime (DefaultRetryWaitTime )
106
95
}
107
- return false
108
- })
96
+ r .Client .AddRetryCondition (func (r * resty.Response , err error ) bool {
97
+ if r .IsError () {
98
+ return true
99
+ }
100
+ if err != nil {
101
+ return true
102
+ }
103
+ return false
104
+ })
105
+ }
109
106
r .Client .SetCloseConnection (r .ConnectionClose )
110
107
return & restyRequest {Request : r .Client .R ()}
111
108
}
You can’t perform that action at this time.
0 commit comments