Only display MOTD in ASGI on startup (#2349)
This commit is contained in:
parent
a23547d73b
commit
313f97ac77
@ -1728,6 +1728,7 @@ class Sanic(BaseSanic, metaclass=TouchUpMeta):
|
|||||||
details: https://asgi.readthedocs.io/en/latest
|
details: https://asgi.readthedocs.io/en/latest
|
||||||
"""
|
"""
|
||||||
self.asgi = True
|
self.asgi = True
|
||||||
|
if scope["type"] == "lifespan":
|
||||||
self.motd("")
|
self.motd("")
|
||||||
self._asgi_app = await ASGIApp.create(self, scope, receive, send)
|
self._asgi_app = await ASGIApp.create(self, scope, receive, send)
|
||||||
asgi_app = self._asgi_app
|
asgi_app = self._asgi_app
|
||||||
|
Loading…
x
Reference in New Issue
Block a user