From 03f95003cacf4dc8e5bd34b182b72db0b7a52d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=86=E6=B5=81=E8=80=8C=E4=B8=8A?= <1666888816@qq.com> Date: Sun, 29 Oct 2023 21:52:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20icodef=20=E9=A2=98=E5=BA=93IP=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E6=AF=8F=E6=97=A5=E9=99=90=E9=A2=9D=E5=90=8E=E4=B8=8D?= =?UTF-8?q?=E9=87=8D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/search/icodef.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/search/icodef.go b/internal/search/icodef.go index ffbdb35..d7cbfc6 100644 --- a/internal/search/icodef.go +++ b/internal/search/icodef.go @@ -30,7 +30,7 @@ func (in *IcodefClient) getHTTPClient() *resty.Client { SetRetryCount(3). SetRetryWaitTime(time.Second). AddRetryCondition(func(r *resty.Response, err error) bool { - return err != nil || strings.Contains(r.String(), "触发流控限制") + return err != nil || (strings.Contains(r.String(), "触发流控限制") && !strings.Contains(r.String(), "IP超出每日限额")) }). AddRetryHook(func(r *resty.Response, err error) { logger.SysError(fmt.Sprintf("iCodef触发流控限制,正在重试...%s", r.String()))