ASGI working

This commit is contained in:
Adam Hopkins
2021-02-08 12:43:10 +02:00
parent 0d5b2a0f69
commit 64f0496d9e
4 changed files with 13 additions and 9 deletions

View File

@@ -1037,8 +1037,8 @@ class Sanic(BaseSanic):
details: https://asgi.readthedocs.io/en/latest/"""
# raise Exception("call")
self.asgi = True
self.router.finalize()
asgi_app = await ASGIApp.create(self, scope, receive, send)
self._asgi_app = await ASGIApp.create(self, scope, receive, send)
asgi_app = self._asgi_app
await asgi_app()
# _asgi_single_callable = True # We conform to ASGI 3.0 single-callable