Skip to content

WinRT WebSocket throws unhandled exception on lost connection #20701

@arturl

Description

@arturl

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.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions