Browse Source

feat:xiugai

wangchuanjin 2 months ago
parent
commit
e0213302f0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/service/service.go

+ 3 - 1
src/service/service.go

@@ -28,8 +28,10 @@ func Post(url, contentType string, body io.Reader, t, phone string) ([]byte, err
 			log.Println(t, phone, "第", i, "次请求出错", err)
 			if i == Config.ReTry {
 				go http.Get(fmt.Sprintf(Config.Warn, "调用"+t+"接口超时"))
+				return nil, err
+			} else {
+				continue
 			}
-			continue
 		}
 		defer resp.Body.Close()
 		b, _ := ioutil.ReadAll(resp.Body)