Skip to content

Tried to fix the exception "System.ArgumentOutOfRangeException: An unexpected state object was encountered. This is usually a sign of a bug in async method custom infrastructure, such as a custom awaiter or IValueTaskSource implementation. (Parameter 'state')"#795

Merged
kerryjiang merged 1 commit intomasterfrom
socketsenderbug
May 8, 2025

Conversation

@kerryjiang
Copy link
Copy Markdown
Owner

System.ArgumentOutOfRangeException: An unexpected state object was encountered. This is usually a sign of a bug in async method custom infrastructure, such as a custom awaiter or IValueTaskSource implementation. (Parameter 'state')
at SuperSocket.Connection.SocketSender.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.<>c.<.cctor>b__173_0(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading.ThreadPoolTypedWorkItemQueue`2.System.Threading.IThreadPoolWorkItem.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

@kerryjiang kerryjiang merged commit 65af03d into master May 8, 2025
3 checks passed
@kerryjiang kerryjiang deleted the socketsenderbug branch May 8, 2025 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant