You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
I run the message loop with IMessageReceiver.RegisterMessageHandler
In my logs I see sometimes (quite rare, but still) this exception that I log in a handler for unobserved task exception (TaskScheduler.UnobservedTaskException).
=== Exception ===
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.Net.WebSockets.WebSocketException: The WebSocket is in an invalid state ('Aborted') for this operation. Valid states are: 'Open, CloseReceived'
at System.Net.WebSockets.WebSocket.ThrowOnInvalidState(WebSocketState state, WebSocketState[] validStates)
at System.Net.WebSockets.WebSocketBase.d__47.MoveNext()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.Net.WebSockets.WebSocketException (0x80004005): The WebSocket is in an invalid state ('Aborted') for this operation. Valid states are: 'Open, CloseReceived'
at System.Net.WebSockets.WebSocket.ThrowOnInvalidState(WebSocketState state, WebSocketState[] validStates)
at System.Net.WebSockets.WebSocketBase.d__47.MoveNext()<---
Expected Behavior
Tasks should be observed in the library
Versions
OS platform and version: Windows 10
.NET Version: 4.6.2
NuGet package version or commit ID: 3.0.2
I am not 100% sure that this comes from the library, but the only other network operations I have is WCF which I have never seen to produce such an error. But I do suspect this happens after some network errors or something similar inside the library.
The text was updated successfully, but these errors were encountered:
Actual Behavior
IMessageReceiver.RegisterMessageHandler
TaskScheduler.UnobservedTaskException
).=== Exception ===
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.Net.WebSockets.WebSocketException: The WebSocket is in an invalid state ('Aborted') for this operation. Valid states are: 'Open, CloseReceived'
at System.Net.WebSockets.WebSocket.ThrowOnInvalidState(WebSocketState state, WebSocketState[] validStates)
at System.Net.WebSockets.WebSocketBase.d__47.MoveNext()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.Net.WebSockets.WebSocketException (0x80004005): The WebSocket is in an invalid state ('Aborted') for this operation. Valid states are: 'Open, CloseReceived'
at System.Net.WebSockets.WebSocket.ThrowOnInvalidState(WebSocketState state, WebSocketState[] validStates)
at System.Net.WebSockets.WebSocketBase.d__47.MoveNext()<---
Expected Behavior
Versions
I am not 100% sure that this comes from the library, but the only other network operations I have is WCF which I have never seen to produce such an error. But I do suspect this happens after some network errors or something similar inside the library.
The text was updated successfully, but these errors were encountered: