From 5ddab034f33372bf1a9709c4fce09d10f642cc7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Thu, 29 May 2025 22:54:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=81=E6=8E=A7=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=88=A4=E6=96=AD=E7=9B=B8=E5=8F=8D=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- httpclient/resty.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient/resty.go b/httpclient/resty.go index 69c4918..5dbad85 100644 --- a/httpclient/resty.go +++ b/httpclient/resty.go @@ -83,7 +83,7 @@ func NewRestyClient(reqConfig *define.Request, reqOption *RequestOption) (*resty } // 限流处理, 增加限流中间件 client.AddRequestMiddleware(func(client *resty.Client, request *resty.Request) error { - if nil != reqOption && nil != reqOption.RateLimiter { + if nil == reqOption || nil == reqOption.RateLimiter { // 未配置流控 return nil }