Sitelet https://web.archive.org/web/20250611190634/https://github.com/scrapy/scrapy/issues/4991
Skip to content

Use transport.loseConnection() #4991

Closed
@Gallaecio

Description

@Gallaecio

A minor cleanup for the future.

At the moment we use this in http11.py:

with suppress(AttributeError):
    txresponse._transport._producer.loseConnection()

Once we drop support for Twisted < 18.4.0, we should be able to switch to:

txresponse._transport.loseConnection()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions