Skip to content

Commit

Permalink
Only display MOTD in ASGI on startup (#2349)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahopkins committed Jan 6, 2022
1 parent a23547d commit 313f97a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sanic/app.py
Expand Up @@ -1728,7 +1728,8 @@ async def __call__(self, scope, receive, send):
details: https://asgi.readthedocs.io/en/latest
"""
self.asgi = True
self.motd("")
if scope["type"] == "lifespan":
self.motd("")
self._asgi_app = await ASGIApp.create(self, scope, receive, send)
asgi_app = self._asgi_app
await asgi_app()
Expand Down

0 comments on commit 313f97a

Please sign in to comment.