Skip to content
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

preventing asyncio.CancelledError from disrupting the request handling without marking the connection as failed #578

Closed
wants to merge 1 commit into from

Conversation

rafaelfelix
Copy link

attempts to address the issue reported in encode/httpx#2139 (comment)

feel free to take over and make it a more complete patch, this is what I did locally and worked. just wanted to share the approach :)

if not isinstance(exc, ConnectionNotAvailable):
self._connect_failed = True

raise exc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe using raise exc will add extra frames to the traceback

Suggested change
raise exc
raise

@zanieb
Copy link
Contributor

zanieb commented Sep 25, 2022

I believe this also addresses #564

@tomchristie
Copy link
Member

feel free to take over and make it a more complete patch

Thank you, yes.
Closing as superseded by #580

@tomchristie tomchristie closed this Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants