Skip to content
Myr

Properly close stream on async response close (#1316)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by daa · committed by GitHub · parent 8ceb34f · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:httpx/_client.py+1 added-1 removed
1503 unmodified lines
1504 )15051506 async def on_close(response: Response) -> None:1507 response.elapsed = datetime.timedelta(seconds=await timer.async_elapsed())1508 if hasattr(stream, "close"):1508 if hasattr(stream, "aclose"):1509 await stream.aclose()15101511 response = Response(1512 status_code,
329 unmodified lines