(
self, exc_type: type, exc_value: BaseException, tb: TracebackType
)
| 78 | return self |
| 79 | |
| 80 | async def __aexit__( |
| 81 | self, exc_type: type, exc_value: BaseException, tb: TracebackType |
| 82 | ) -> None: |
| 83 | if exc_type is not None: |
| 84 | await self.disconnect() |
| 85 | await self._task |
| 86 | while not self._receive_queue.empty(): |
| 87 | data = await self._receive_queue.get() |
| 88 | if isinstance(data, bytes): |
| 89 | self.response_data.extend(data) |
| 90 | elif not isinstance(data, HTTPDisconnectError): |
| 91 | raise data |
| 92 | |
| 93 | async def as_response(self) -> Response: |
| 94 | while not self._receive_queue.empty(): |
nothing calls this directly
no test coverage detected