The service threw an unhandled exception, System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.WebSockets.ClientWebSocket'.
at System.Net.WebSockets.ClientWebSocket.ThrowIfNotConnected()
at System.Net.WebSockets.ClientWebSocket.CloseOutputAsync(WebSocketCloseStatus closeStatus, String statusDescription, CancellationToken cancellationToken)
at Microsoft.Azure.Relay.WebSocketStream.<OnShutdownAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Relay.HybridConnectionStream.<ShutdownAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Actual Behavior
azure-relay-dotnet/src/Microsoft.Azure.Relay/WebSocketStream.cs
Line 80 in 5e41166
azure-relay-dotnet/src/Microsoft.Azure.Relay/WebSocketStream.cs
Line 153 in 5e41166
The real issue is that the websockets client throws :(
https://github.com/dotnet/runtime/blob/d6bf13a39c8ccb8fa7815a2f7e4387120a837138/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocket.cs#L226
Expected Behavior
Versions