mirror of https://github.com/scrapy/scrapy.git
Close the connection on download_maxsize.
This commit is contained in:
parent
9f90618533
commit
8e112e3735
|
|
@ -545,7 +545,8 @@ class _ScrapyAgent:
|
|||
expected_size, maxsize, request, expected=True
|
||||
)
|
||||
logger.warning(warning_msg)
|
||||
txresponse._transport.loseConnection()
|
||||
# Abort connection immediately.
|
||||
txresponse._transport._producer.abortConnection()
|
||||
raise DownloadCancelledError(warning_msg)
|
||||
|
||||
if warnsize and expected_size > warnsize:
|
||||
|
|
|
|||
Loading…
Reference in New Issue