Aborted; 6; Reserved for future use.
That future has now occured on my computer. Guess it's no longer the future but the present, and this value needs documentation.
.NET Core 2.0 on Windows 10.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
This seems to happen after an ongoing call to ClientWebSocket.ReceiveAsync was cancelled by cancelling the CancellationToken that was passed to it. Actually I'd just like to unblock that call but that seems to destroy the entire WebSocket. I can't even close it normally when it's in the Aborted state. Is that an implementation bug in the ClientWebSocket class rather than a documentation omission?
@karelz @davidsh can you guys help with this question? Is that just a typo in our docs? Thanks!
I can't even close it normally when it's in the Aborted state. Is that an implementation bug in the ClientWebSocket class rather than a documentation omission?
If you cancel a websocket I/O (i.e. via the CancellationToken on the ReceiveAsync call), the websocket is "closed" but in an Aborted state (i.e. no close frame handshake is done). It is thus in a terminal state and can no longer be used.
It is not an implementation bug. But perhaps the documentation can be made clearer on this topic.
Another case is when the connection is forcibly closed by the remote side. Does that also cause WebSocketState to be Aborted?
Most helpful comment
If you cancel a websocket I/O (i.e. via the CancellationToken on the ReceiveAsync call), the websocket is "closed" but in an Aborted state (i.e. no close frame handshake is done). It is thus in a terminal state and can no longer be used.
It is not an implementation bug. But perhaps the documentation can be made clearer on this topic.