From 3a5ff9179ad4b524321ab458d9c8394f1f2212ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Tue, 21 May 2024 02:01:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=8E=B7=E5=8F=96=E5=85=AC=E7=BD=91IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/tools/tools.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tools/tools.go b/pkg/tools/tools.go index ee867864..7046c346 100644 --- a/pkg/tools/tools.go +++ b/pkg/tools/tools.go @@ -546,7 +546,7 @@ func IsChina() bool { func GetPublicIP() (string, error) { client := resty.New() client.SetTimeout(5 * time.Second) - client.SetTimeout(2) + client.SetRetryCount(2) resp, err := client.R().Get("https://www.cloudflare-cn.com/cdn-cgi/trace") if err != nil || !resp.IsSuccess() {