(self, receive: Receive, send: Send)
| 98 | self.exc_info: Any = None |
| 99 | |
| 100 | async def __call__(self, receive: Receive, send: Send) -> None: |
| 101 | body = b"" |
| 102 | more_body = True |
| 103 | while more_body: |
| 104 | message = await receive() |
| 105 | body += message.get("body", b"") |
| 106 | more_body = message.get("more_body", False) |
| 107 | environ = build_environ(self.scope, body) |
| 108 | |
| 109 | async with create_collapsing_task_group() as task_group: |
| 110 | task_group.start_soon(self.sender, send) |
| 111 | async with self.stream_send: |
| 112 | await anyio.to_thread.run_sync(self.wsgi, environ, self.start_response) |
| 113 | if self.exc_info is not None: |
| 114 | raise self.exc_info[0].with_traceback(self.exc_info[1], self.exc_info[2]) |
| 115 | |
| 116 | async def sender(self, send: Send) -> None: |
| 117 | async with self.stream_receive: |
nothing calls this directly
no test coverage detected