Repository navigation
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) . |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When running the following code (pytest):
I'm getting the following error:
Upon inspection I found that the problem lies in
server.pyat_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
All reactions