Error in shutting down server with Starlette app immediately after starting up #2434
Unanswered
kichanyurd
asked this question in
Potential Issue
Replies: 1 comment
-
@Kludex Please let me know your thoughts on this and #2433 (comment) . |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When running the following code (pytest):
I'm getting the following error:
Upon inspection I found that the problem lies in
server.py
at_serve()
:Specifically, the lifespan class is not shut down properly in this case, which would be triggered in
self.shutdown()
.Looking at the implementation, I tried a fix, which works, and which I suspect should be there anyhow.
This is how I resolved the issue I was having:
I changed this:
to this:
Thoughts?
P.S. I have a PR with this fix at #2433
Beta Was this translation helpful? Give feedback.
All reactions