]> git.ipfire.org Git - pakfire.git/commitdiff
hub: Attempt to reconnect on 502 Proxy Error
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Apr 2023 10:23:57 +0000 (10:23 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Apr 2023 10:23:57 +0000 (10:23 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/hub.py

index 3e95b864725a15d9b76c8de8b87cdf393de80616..a3b3c7517dec7ab97ea188aad13cffdfb8c1d355 100644 (file)
@@ -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