fix: improve lifespan handling in asgi.py#148
Conversation
|
Now let me carefully review the code changes:
Let me check for potential issues:
Let me verify one more thing — whether the Looking at The code looks solid. The only thing I notice that's worth flagging: There is one subtle issue — after a successful startup, if the lifespan coroutine crashes during the shutdown phase, the exception handler at line 151 logs it and resolves However, this is a reasonable design choice — the ASGI spec says an exception during the lifespan scope is different from explicitly sending a failure message. This is arguably correct behavior. Overall, this is a well-structured change with good test coverage. LGTM |
split out from #147. It only includes asgi.py lifespan + null body handling changes with corresponding tests without django-specific tests.