Skip to content

Commit 1e15290

Browse files
author
yunzhouwu
committed
TODO: try many times
1 parent b7f945c commit 1e15290

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pingpp/apiBackend.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ func (s *ApiBackend) Do(req *http.Request, v interface{}) error {
108108
if err != nil {
109109
return err
110110
}
111+
111112
for i := 0; i <= retryTimes; i++ {
112113
req.Body = ioutil.NopCloser(bytes.NewBuffer(reqBody))
113114
res, err := s.HTTPClient.Do(req)
@@ -173,6 +174,7 @@ func (s *ApiBackend) Do(req *http.Request, v interface{}) error {
173174
if v != nil {
174175
return JsonDecode(resBody, v)
175176
}
177+
return nil
176178
}
177179
return nil
178180
}

0 commit comments

Comments
 (0)