From f38a88ed92874d4f976feb29deed71737648bd2e Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Thu, 24 Apr 2008 22:20:43 -0700 Subject: [PATCH] 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. --- apt_p2p/apt_p2p.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2