dotnet / dotnet/wcf

async void with unhandled exception in WebSocketTransportDuplexSessionChannel.cs

Open
#4,783 1 comment 0 reactions 1 assignee Assigned to @mconnew View on GitHub
triaged
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

**Describe the bug**
I don't have a way of reproducing it, but I found it by looking at the code.
In file: wcf/src/System.Private.ServiceModel/src/System/ServiceModel/Channels/WebSocketTransportDuplexSessionChannel.cs you have a a class WebSocketMessageSource that has a method:
`async void StartNextReceiveAsync()`

it has an exception being thrown:
`if (currentState != AsyncReceiveState.Finished)
{
throw FxTrace.Exception.AsError(new InvalidOperationException());
}`

In the case of this exception, aren't we crashing the process?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.