We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9820975 commit bb21c7cCopy full SHA for bb21c7c
httpcore/_async/connection_pool.py
@@ -403,7 +403,10 @@ async def __aiter__(self) -> typing.AsyncIterator[bytes]:
403
async for part in self._stream:
404
yield part
405
except BaseException as exc:
406
- await self.aclose()
+ try:
407
+ await self.aclose()
408
+ except BaseException:
409
+ pass
410
raise exc from None
411
412
async def aclose(self) -> None:
httpcore/_sync/connection_pool.py
@@ -403,7 +403,10 @@ def __iter__(self) -> typing.Iterator[bytes]:
for part in self._stream:
- self.close()
+ self.close()
def close(self) -> None:
0 commit comments