]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_p2p/PeerManager.py
Add a final retry of all errback mirror downloads.
[quix0rs-apt-p2p.git] / apt_p2p / PeerManager.py
index 31d926168954c953c4ef3a6a314462c34a8a4693..9e3f6daf678d0f3a1f15b0a289be5605630e4f56 100644 (file)
@@ -370,7 +370,7 @@ class FileDownload:
         #        del self.peers[site]
 
         # Start the DHT lookup
-        lookupDefer = self.manager.dht.getValue(key)
+        lookupDefer = self.manager.dht.get(key)
         lookupDefer.addBoth(self._getDHTPieces, key)
         
     def _getDHTPieces(self, results, key):
@@ -577,7 +577,7 @@ class FileDownload:
                 headers = {}
                 if response.headers.hasHeader('last-modified'):
                     headers['last-modified'] = response.headers.getHeader('last-modified')
-                resp = Response(200, {}, self.stream)
+                resp = Response(200, headers, self.stream)
                 df.callback(resp)
 
             # Read the response stream to the file
@@ -636,7 +636,7 @@ class PeerManager:
     
     @type cache_dir: L{twisted.python.filepath.FilePath}
     @ivar cache_dir: the directory to use for storing all files
-    @type dht: L{interfaces.IDHT}
+    @type dht: L{DHTManager.DHT}
     @ivar dht: the DHT instance
     @type stats: L{stats.StatsLogger}
     @ivar stats: the statistics logger to record sent data to