Merge pull request #1741 from scrapy/py3-downloader-gc

[MRG+1] PY3 fix downloader slots GC
This commit is contained in:
Nicolás Alejandro Ramírez Quiros 2016-02-02 12:17:52 -03:00
commit 8a391a557f
1 changed files with 1 additions and 1 deletions

View File

@ -194,6 +194,6 @@ class Downloader(object):
def _slot_gc(self, age=60):
mintime = time() - age
for key, slot in self.slots.items():
for key, slot in list(self.slots.items()):
if not slot.active and slot.lastseen + slot.delay < mintime:
self.slots.pop(key).close()