Remove broken timeout retry

This commit is contained in:
Zed 2023-03-28 01:55:39 +02:00
parent f0e1cb5ddb
commit bb221fb995
1 changed files with 3 additions and 8 deletions

View File

@ -67,14 +67,9 @@ template fetchImpl(result, fetchBody) {.dirty.} =
getContent()
if not resp.status.startsWith("2"):
# Twitter sometimes times out, retry.
if resp.status == $Http400 and "TimeoutError" in result:
getContent()
if resp.status == $Http503:
badClient = true
raise newException(BadClientError, "Bad client")
if resp.status == $Http503:
badClient = true
raise newException(BadClientError, "Bad client")
if result.len > 0:
if resp.headers.getOrDefault("content-encoding") == "gzip":