The ClientWebSocketResponse.closed is False when the web socket connection is rapidly closed by some issue (or the server closed the connection by itself).
Information about the closed connection is available in transport (WebSocketWriter.transport.is_closing()), but there is no public access to it from the ClientWebSocketResponse instance.
Describe the bug
The ClientWebSocketResponse.closed is False when the web socket connection is rapidly closed by some issue (or the server closed the connection by itself). Information about the closed connection is available in transport (WebSocketWriter.transport.is_closing()), but there is no public access to it from the ClientWebSocketResponse instance.
To Reproduce
Server:
Client
Expected behavior
Have the ability to check the state of connection and avoid spending time preparing data for sending with closed transport.
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
Linux, macOS
Related component
Client
Additional context
No response
Code of Conduct