From: Michael Tremer Date: Thu, 27 Apr 2023 10:23:57 +0000 (+0000) Subject: hub: Attempt to reconnect on 502 Proxy Error X-Git-Tag: 0.9.29~183 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2eb22ec15fe9a4de2185c663929d7da9cc387110;p=people%2Fms%2Fpakfire.git hub: Attempt to reconnect on 502 Proxy Error Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/hub.py b/src/pakfire/hub.py index 3e95b8647..a3b3c7517 100644 --- a/src/pakfire/hub.py +++ b/src/pakfire/hub.py @@ -466,8 +466,9 @@ class HubObject(object): except tornado.httpclient.HTTPClientError as e: log.error("%s: Received HTTP Error %s" % (self.url, e.code)) - # If the service is down we will retry in 10 seconds - if e.code == 503: + # 502 - Proxy Error + # 503 - Service Unavailable + if e.code in (502, 503): await asyncio.sleep(10) # Raise any unhandled errors