(self)
| 708 | self.exit_stack.close() |
| 709 | |
| 710 | async def lifespan(self) -> None: |
| 711 | scope = {"type": "lifespan", "state": self.app_state} |
| 712 | try: |
| 713 | await self.app(scope, self.stream_receive.receive, self.stream_send.send) |
| 714 | finally: |
| 715 | await self.stream_send.send(None) |
| 716 | |
| 717 | async def wait_startup(self) -> None: |
| 718 | await self.stream_receive.send({"type": "lifespan.startup"}) |