-
Notifications
You must be signed in to change notification settings - Fork 135
Client app crashing with "Cannot access a disposed object." exception #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, can you elaborate why you're disposing of the entire |
propably related to #329 |
I am using the GraphQl.Client 6.0.3 the described flow is valid me as well, because it is the same application:
we get one of the following errors sporadically:
Or sometimes as well:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am using the GraphQl.Client 3.2.1 on a project and I get an exception crashing the application after a while.
I have a client that it connects to a graphQl server from multiple threads and it is creating a subscription stream to receive notifications. The client has to do a reconnection to the server periodically. By reconnection I mean:
After several reconnections I get this:
System.ObjectDisposedException
HResult=0x80131622
Message=Cannot access a disposed object.
Object name: 'System.Net.WebSockets.InternalClientWebSocket'.
Source=System
StackTrace:
at System.Net.WebSockets.WebSocketBase.ThrowIfDisposed()
at System.Net.WebSockets.WebSocketBase.WebSocketOperation.d__19.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.WebSockets.WebSocketBase.d__47.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GraphQL.Client.Http.Websocket.GraphQLHttpWebSocket.d__32.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GraphQL.Client.Http.Websocket.GraphQLHttpWebSocket.d__31.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GraphQL.Client.Http.Websocket.GraphQLHttpWebSocket.<>c__DisplayClass28_1`1.<b__7>d.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
This exception was originally thrown at this call stack:
[External Code]
Can anyone help me understand what is the cause of this?
The text was updated successfully, but these errors were encountered: