mirror of https://github.com/scrapy/scrapy.git
Explicitly call Twisted transport stopProducing() on HTTP/1.0 timeouts
This commit is contained in:
parent
a0c5c61855
commit
4547a7e759
|
|
@ -83,6 +83,11 @@ class ScrapyHTTPPageGetter(HTTPClient):
|
|||
|
||||
def timeout(self):
|
||||
self.transport.loseConnection()
|
||||
|
||||
# transport cleanup needed for HTTPS connections
|
||||
if self.factory.url.startswith(b'https'):
|
||||
self.transport.stopProducing()
|
||||
|
||||
self.factory.noPage(\
|
||||
defer.TimeoutError("Getting %s took longer than %s seconds." % \
|
||||
(self.factory.url, self.factory.timeout)))
|
||||
|
|
|
|||
Loading…
Reference in New Issue