How to debug a hung call to ClientWebSocket.ReceiveAsync

159 views Asked by At

I have a C# Windows Forms Application that sends and receives data using ClientWebSocket. At some point, the call to ClientWebSocket.ReceiveAsync hangs and doesn't return.

WebSocketReceiveResult webSocketReceiveResult = await ClientWebSocket.ReceiveAsync(arraySegment, CancellationTokenSourceReceive.Token);

While the call is hung, the connection remains open. The client can still send messages to the server and the server continues to send messages to the client; the incoming messages can be seen in a fiddler trace.

What tools are available in Visual Studio to debug this?

0

There are 0 answers