From e6d7afa13b31eeef141b283c84e703a46525064b Mon Sep 17 00:00:00 2001 From: olveyra Date: Tue, 3 Apr 2012 23:14:00 +0000 Subject: [PATCH] Fix autothrottle in order to modify also inactive downloader slots, so cases fixed by inactive slots patch will work ok also when using autothrottle --- scrapy/contrib/throttle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/contrib/throttle.py b/scrapy/contrib/throttle.py index 423f3726c..ba462a55d 100644 --- a/scrapy/contrib/throttle.py +++ b/scrapy/contrib/throttle.py @@ -106,7 +106,7 @@ class AutoThrottle(object): key = urlparse_cached(request).hostname or '' if downloader.ip_concurrency: key = dnscache.get(key, key) - return key, downloader.slots.get(key) + return key, downloader.slots.get(key) or downloader.inactive_slots.get(key) def _check_concurrency(self, slot, latency): latencies = self.last_latencies