async void with unhandled exception in WebSocketTransportDuplexSessionChannel.cs
Open
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
Assessment
This issue has not been assessed yet.