summaryrefslogtreecommitdiff
path: root/internal/httpclient/client.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-04-30 15:18:32 +0100
committerLibravatar GitHub <noreply@github.com>2024-04-30 16:18:32 +0200
commitec7c983e46f24850abd5f37dbdaedb06d52ef534 (patch)
tree8eae0a11e0ff8e764ee11dde945dd078b29ea3fc /internal/httpclient/client.go
parent[chore] include attemptno in httpclient logs (#2887) (diff)
downloadgotosocial-ec7c983e46f24850abd5f37dbdaedb06d52ef534.tar.xz
[bugfix] retry on http 500 errors *inclusive* (#2886)
Diffstat (limited to 'internal/httpclient/client.go')
-rw-r--r--internal/httpclient/client.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/httpclient/client.go b/internal/httpclient/client.go
index ed0949c9c..74c931ea9 100644
--- a/internal/httpclient/client.go
+++ b/internal/httpclient/client.go
@@ -339,7 +339,7 @@ func (c *Client) do(r *Request) (rsp *http.Response, retry bool, err error) {
// A retryable error.
return nil, true, err
- } else if rsp.StatusCode > 500 ||
+ } else if rsp.StatusCode >= 500 ||
rsp.StatusCode == http.StatusTooManyRequests {
// Codes over 500 (and 429: too many requests)