-
-
Notifications
You must be signed in to change notification settings - Fork 951
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
ASGI WebSocket protocol 2.4: send()
may raise OSError
#2292
Comments
send()
may raise OSError
send()
may raise OSError
I agree that the primary impact is likely the websocket, since in the other cases the sent is confined to the app class, allowing the orerror to be propagated without much issues to the api server. For websocket we likely need to close it if send raises an os error |
I don't think we need to close the websocket at hand, because closing is performed via However, we'll need to make sure that we properly reraise this exception as |
my closing I meant cleaning up the internal state, like the |
The last paragraph of Lost Connections also needs to be reworded:
(emphasis mine) ➡️ Conversely, these implementations do actually follow the spec version 2.4. |
send()
may raise OSError
send()
may raise OSError
I split the HTTP part to another issue (#2323), and address only the WebSocket part for 4.0. |
In the ASGI HTTP & WebSocket protocol version
2.4
, callingsend()
on a closed connection should raise anOSError
.See also Disconnected Client -
send
exception:Do we need to adjust our code? Or do we just bubble this up to the app server?
Note: this issue is aiming to address this only for WebSocket. The same issue in the usual HTTP protocol is tracked as #2323.
See also:
The text was updated successfully, but these errors were encountered: