InvalidStateError on output stream close in BiDi API
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Search for CRTResponseBody._on_complete and inspect how the output stream's future is completed during close. Reproduce the BiDi API output-stream close path, then verify that closing it no longer raises InvalidStateError when the future is cancelled.
Written by the indexing model from the issue text.
Description
When using the BiDi API and closing the output stream, I always see low-level CRT futures that raise concurrent.futures.InvalidStateError
This seems to be occurring because CRTResponseBody._on_complete() is invoking future.set_result(b"") when the future is already in a CANCELLED state.
Although the error is mostly cosmetic, it still interrupts any higher-level async task loops.
Please add a guard or something like:
if not future.cancelled():
future.set_results(b"")
- Dominant language
- Python
- Stars
- 171
- Forks
- 24
- Avg merge
- 10h 47m
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-sdk-python
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
aws/aws-sdk-python#99 ·
-
Support Python 3.11 Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
aws/aws-sdk-python#92 ·
-
announcement
Difficulty 5/5 Over a week Newbie friendliness 25/100
aws/aws-sdk-python#90 ·
-
announcement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws/aws-sdk-python#84 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
aws/aws-sdk-python#18 ·
All issues in aws/aws-sdk-python
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·