◐ Shell
reader mode source ↗
Skip to content

bpo-30861: Return StreamReeader remaining buffer before raise an exception#7473

Open
pfreixes wants to merge 4 commits into
python:mainfrom
pfreixes:fix/return_ramains_buffer_before_raise_exception_2
Open

bpo-30861: Return StreamReeader remaining buffer before raise an exception#7473
pfreixes wants to merge 4 commits into
python:mainfrom
pfreixes:fix/return_ramains_buffer_before_raise_exception_2

Conversation

@pfreixes

@pfreixes pfreixes commented Jun 7, 2018

Copy link
Copy Markdown

The current implementation of StreamReader does not take care of the status of the buffer, once an exception has been set via set_exception any call to the read methods won't be able to get the missing data still pending to be processed.

From the point of view of the developer, if there is no scheduled task for waiting for data into the Streamreader between a network data gets into the buffer socket and a closing connection by the other peer arrives, the developer won't be able to gather the previous data.

This PR take care first of the remaining buffer and try to return first to the user, and only when the buffer has run out raises the proper exception

https://bugs.python.org/issue30861

@pfreixes

pfreixes commented Jun 7, 2018

Copy link
Copy Markdown
Author

@Mariatta do you know why some of the checks failed? indeed the failed ones even started :(

@Mariatta

Mariatta commented Jun 7, 2018

Copy link
Copy Markdown
Member

Sorry, I'm not yet familiar with VSTS builds. Ping @zooba.

@csabella

Copy link
Copy Markdown
Contributor

Closing and reopening to trigger builds.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants