Marking response.force_close() doesn't prevent lingering
Author: iceboy233Created Apr 9, 2017Updated Aug 22, 2026
Labelsbug
Long story short
Returning a response with force_close() before the request is fully read still causes lingering.
Expected behaviour
Connection should be closed immediately after the response is written.
Actual behaviour
The lingering logic in web_protocol.py is activated.
Source: aio-libs/aiohttp