-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Conversation
Kludex
commented
Jan 17, 2024
- Comply with Add an IOError when send() is called on a closed connection django/asgiref#431.
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.
What about http?
uvicorn/protocols/utils.py
Outdated
@@ -6,6 +6,10 @@ | |||
from uvicorn._types import WWWScope | |||
|
|||
|
|||
class Disconnected(IOError): |
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 ClientDisconnected?
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.
done
I don't know yet, but shouldn't be a blocker for this PR. |
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. 👀 |
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). |
c11e0b0
to
5df891f
Compare
@@ -6,6 +6,10 @@ | |||
from uvicorn._types import WWWScope | |||
|
|||
|
|||
class ClientDisconnected(IOError): |
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.
IOError is an alias for OSError on python 3
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.
Ouch I think we put IOError
in the spec...