From: Cameron Dale Date: Fri, 25 Apr 2008 05:20:43 +0000 (-0700) Subject: Don't use the fallback mirror retry download. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f38a88ed92874d4f976feb29deed71737648bd2e;p=quix0rs-apt-p2p.git Don't use the fallback mirror retry download. 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. --- diff --git a/apt_p2p/apt_p2p.py b/apt_p2p/apt_p2p.py index 88e07ea..c7e6d67 100644 --- a/apt_p2p/apt_p2p.py +++ b/apt_p2p/apt_p2p.py @@ -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