mirror of
https://github.com/zedeus/nitter.git
synced 2025-12-06 03:55:36 -05:00
Handle ProtocolError and BadClientError equally
This commit is contained in:
@@ -39,11 +39,8 @@ template use*(pool: HttpPool; heads: HttpHeaders; body: untyped): untyped =
|
||||
|
||||
try:
|
||||
body
|
||||
except ProtocolError:
|
||||
# Twitter closed the connection, retry
|
||||
body
|
||||
except BadClientError:
|
||||
# Twitter returned 503, we need a new client
|
||||
except BadClientError, ProtocolError:
|
||||
# Twitter returned 503 or closed the connection, we need a new client
|
||||
pool.release(c, true)
|
||||
badClient = false
|
||||
c = pool.acquire(heads)
|
||||
|
||||
Reference in New Issue
Block a user