WebSocketListener
WebSocketListener copied to clipboard
On quick client disconnect, ObjectDisposedException being thrown
Exception thrown: 'System.ObjectDisposedException' in mscorlib.dll is being almost immediately thrown twice when trying to test a websocket with chrome on http://demos.kaazing.com/echo/index.html. Works fine in firefox.
From that site, I am getting the output: CONNECT: ws://ip:port CLOSED: (1006)
When turning on break settings for objectdisposed exception, the following details are given: System.ObjectDisposedException HResult=0x80131622 Message=The semaphore has been disposed. Source=mscorlib StackTrace: at System.Threading.SemaphoreSlim.CheckDispose() in f:\dd\ndp\clr\src\BCL\system\threading\SemaphoreSlim.cs:line 906
Call stack:
mscorlib.dll!System.Threading.SemaphoreSlim.CheckDispose() Line 904 C# mscorlib.dll!System.Threading.SemaphoreSlim.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Line 318 C# mscorlib.dll!System.Threading.SemaphoreSlim.Wait(System.TimeSpan timeout) Line 252 C# vtortola.WebSockets.dll!vtortola.WebSockets.Rfc6455.WebSocketConnectionRfc6455.WriteInternal(System.ArraySegment
buffer, int count, bool isCompleted, bool headerSent, vtortola.WebSockets.Rfc6455.WebSocketFrameOption option, vtortola.WebSockets.WebSocketExtensionFlags extensionFlags) Unknown vtortola.WebSockets.dll!vtortola.WebSockets.Rfc6455.WebSocketConnectionRfc6455.Close(vtortola.WebSockets.Rfc6455.WebSocketCloseReasons reason) Unknown vtortola.WebSockets.dll!vtortola.WebSockets.Rfc6455.WebSocketConnectionRfc6455.AwaitHeaderAsync(System.Threading.CancellationToken cancel) Unknown mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.InvokeMoveNext(object stateMachine) Line 1090 C# mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 954 C# mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 902 C# mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() Line 1070 C# mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Line 715 C# mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 820 C# mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Line 1161 C#
Hi!
That is very strange. Do you think it would be possible to create a small project reproducing the problem?
Cheers.