1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-25 12:24:19 +00:00

PY3 fix downloader slots GC

This commit is contained in:
Mikhail Korobov 2016-01-28 02:59:23 +05:00
parent a35aec71e9
commit f9dc02e23a

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()