runtime: WinRT WebSocket throws unhandled exception on lost connection
The issues affects UWP implementation of ClientWebSocket.
When ReceiveAsync call is pending and the connection is lost, System.Net.WebSockets.WinRTWebSocket.OnMessageReceived throws an exception with HRESULT 0x80072EFE (“The connection with the server was terminated abnormally”) here:
https://github.com/dotnet/corefx/blob/master/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WinRTWebSocket.cs#L282
The exception is thrown on a background thread, which cannot be handled so it brings down the process.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (12 by maintainers)
Fixing this is part of our UWP6.0 work (i.e. NETStandard20 for UWP). That will RTM later this year but a preview in a few months.
cc: @karelz
I have no estimate at this time. Any short-term fix would have to done via the release/servicing branches (such as release/1.1.0 etc.) and then a new updated System.Net.WebSockets.Client nuget package generated (tested and marked as stable).
We will hopefully post an update on schedule expectations within the next week or so.