Configure event loop using ASGI mode too

This commit is contained in:
prryplatypus 2021-10-10 20:46:57 +02:00
parent 7f69e43743
commit 257b239cac
No known key found for this signature in database
GPG Key ID: 6687E128FB70819B

View File

@ -1398,6 +1398,7 @@ class Sanic(BaseSanic, metaclass=TouchUpMeta):
details: https://asgi.readthedocs.io/en/latest
"""
self.asgi = True
self._configure_event_loop()
self._asgi_app = await ASGIApp.create(self, scope, receive, send)
asgi_app = self._asgi_app
await asgi_app()