-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix hanging on streams when stdio_client exiting #559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Triggers a TaskGroup cancel after reaching the finally code block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, the clean up change looks good.
Please can you move the test to tests/client/test_stdio.py
Merged to test_stdio.py
You're welcome, @ihrpr. Just so you know, all requested changes are resolved :) |
Use async versions of .close() Co-authored-by: ihrpr <inna.hrpr@gmail.com>
@ihrpr Resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Triggers a TaskGroup cancel after reaching the finally code block.
Motivation and Context
stdin_writer
in the task group hangs when pressing Ctrl+c.Now we explicitly close the streams blocking.
How Has This Been Tested?
Tested in a new simple no-op test and a real Uvicorn Starlette application.
Types of changes
Checklist