Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport#13098
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The backport to 3.7 is desired. |
# ConnectionResetError otherwise | ||
fut = self._protocol._get_close_waiter(self) | ||
await fut | ||
raise ConnectionResetError('Connection lost') |
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.
Do we want to raise an error from drain()? Maybe it should just return? What's the point of this error?
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.
That's howprotocol._drain_helper()
works now.
The future is set to exception only if the connection is closed with a failure.
Butawait writer.drain()
raisesConnectionResetError
.
I believe this is good:await writer.write(b'data')
should fail loudly if the socket is closed.
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.
Maybe the code could be simplified by setting ConnectionResetError byconnection_lost()
callback handler but I'd like to keep the PR small.
Future improvement worth another pull request.
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.
OK, got it.
Thanks@asvetlov for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
pythonGH-13098)https://bugs.python.org/issue36801(cherry picked from commit1cc0ee7)Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
bedevere-bot commentedMay 7, 2019
GH-13176 is a backport of this pull request to the3.7 branch. |
GH-13098)https://bugs.python.org/issue36801(cherry picked from commit1cc0ee7)Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
nullstd commentedJun 9, 2023
Hi@asvetlov , I ran into a
Note the subprocess ends very soon, and it seems
|
nullstd commentedJun 9, 2023
nullstd commentedJun 9, 2023
cc@1st1 |
gpshead commentedJun 9, 2023 • edited by AlexWaygood
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by AlexWaygood
Uh oh!
There was an error while loading.Please reload this page.
please do not post questions and cc people on long closed/merged PRs. Please use the discuss.python.org Help category - and only when it seems an actual CPython issue has been found, file a new issue in the issue tracker. |
Uh oh!
There was an error while loading.Please reload this page.
https://bugs.python.org/issue36801