From 125148b51f6a52b1bf294fa232fd3fd2eec6dd85 Mon Sep 17 00:00:00 2001 From: lc Date: Wed, 20 Apr 2022 13:30:54 -0500 Subject: [PATCH] fix(gau): fix httpclient retries. i'm an idiot --- pkg/httpclient/client.go | 4 +++- pkg/providers/providers.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/httpclient/client.go b/pkg/httpclient/client.go index d9f2cd1..64aefa5 100644 --- a/pkg/httpclient/client.go +++ b/pkg/httpclient/client.go @@ -51,8 +51,10 @@ func MakeRequest(c *fasthttp.Client, url string, maxRetries uint, timeout uint, if resp.StatusCode() == 503 { continue } - } + goto done + } +done: if resp.StatusCode() != 200 { return nil, ErrNon200Response } diff --git a/pkg/providers/providers.go b/pkg/providers/providers.go index a826597..e9c3dda 100644 --- a/pkg/providers/providers.go +++ b/pkg/providers/providers.go @@ -5,7 +5,7 @@ import ( "github.com/valyala/fasthttp" ) -const Version = `2.1.0` +const Version = `2.1.1` // Provider is a generic interface for all archive fetchers type Provider interface {