]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
Don't use the fallback mirror retry download.
authorCameron Dale <camrdale@gmail.com>
Fri, 25 Apr 2008 05:20:43 +0000 (22:20 -0700)
committerCameron Dale <camrdale@gmail.com>
Fri, 25 Apr 2008 05:20:43 +0000 (22:20 -0700)
Until we can distinuish real errors from apt-get closing the
connection, this is not a good idea. See the connectionLost()
function of the web2.http.Request object for a possible solution.

apt_p2p/apt_p2p.py

index 88e07eaca4948c17f46ff5987666949d978f7dc6..c7e6d6726078e96a7c3245bccacd64c70e8fa03e 100644 (file)
@@ -289,7 +289,7 @@ class AptP2P(protocol.Factory):
             else:
                 log.msg('Peers for %s were not found' % url)
             getDefer = self.peers.get(hash, url)
-            getDefer.addErrback(self.final_fallback, hash, url)
+#            getDefer.addErrback(self.final_fallback, hash, url)
             getDefer.addCallback(self.cache.save_file, hash, url)
             getDefer.addErrback(self.cache.save_error, url)
             getDefer.addCallbacks(d.callback, d.errback)
@@ -307,7 +307,7 @@ class AptP2P(protocol.Factory):
         if response.code < 200 or response.code >= 300:
             log.msg('Download from peers failed, going to direct download: %s' % url)
             getDefer = self.peers.get(hash, url)
-            getDefer.addErrback(self.final_fallback, hash, url)
+#            getDefer.addErrback(self.final_fallback, hash, url)
             return getDefer
         return response