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

Raise Disconnect on send() when client disconnected #2218

Merged
merged 5 commits into from
Jan 19, 2024
Merged

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Jan 17, 2024

Copy link
Member

@adriangb adriangb left a comment

Choose a reason for hiding this comment

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

What about http?

@@ -6,6 +6,10 @@
from uvicorn._types import WWWScope


class Disconnected(IOError):
Copy link
Member

Choose a reason for hiding this comment

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

Maybe ClientDisconnected?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@Kludex
Copy link
Member Author

Kludex commented Jan 18, 2024

What about http?

I don't know yet, but shouldn't be a blocker for this PR.

@adriangb
Copy link
Member

Ok just wanted to know it will be handled in a future PR

@Kludex
Copy link
Member Author

Kludex commented Jan 18, 2024

Ok just wanted to know it will be handled in a future PR

I have personal plans to work on this on the next days, but I don't want to promise. 👀

@adriangb
Copy link
Member

No need to promise. I just wanted to make sure you're not proposing that it doesn't get implemented by anyone at any time (i.e. this PR is all we're going to do).

@Kludex Kludex enabled auto-merge (squash) January 19, 2024 21:58
@Kludex Kludex merged commit afed732 into master Jan 19, 2024
15 checks passed
@Kludex Kludex deleted the ioerror-on-send branch January 19, 2024 22:01
@@ -6,6 +6,10 @@
from uvicorn._types import WWWScope


class ClientDisconnected(IOError):
Copy link
Member

Choose a reason for hiding this comment

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

IOError is an alias for OSError on python 3

Copy link
Member

Choose a reason for hiding this comment

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

Ouch I think we put IOError in the spec...

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.

3 participants