wangchuanjin hace 2 meses
padre
commit
e0213302f0
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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)