Open bohao-cao opened 6 years ago
Can it be reproduced outside docker?
This issue happened only once under stress test.
ArraySegmentList.CopyTo(T[] to, int srcIndex, int toIndex, int length) ln 492 throws. A naive example will throw the same argument exception. int[] a = { 1, 2, 3}; int[] b = { 9,10,11}; Array.Copy(a,0,b,1,3);
Ok, I'll check this issue soon. That would be great, if you provide some test cases.
Environment: Dot net core application running in a docker container.
Issue
Unhandled Exception: System.ArgumentException: Destination array was not long enough. Check the destination index, length, and the array's lower bounds. Parameter name: destinationArray at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at WebSocket4Net.Common.ArraySegmentListb__14_0(Object o)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
1.CopyTo(T[] to, Int32 srcIndex, Int32 toIndex, Int32 length) at WebSocket4Net.WebSocketCommandInfo..ctor(IList
1 frames) at WebSocket4Net.Protocol.DraftHybi10DataReader.GetCommandInfo(Byte[] readBuffer, Int32 offset, Int32 length, Int32& left) at WebSocket4Net.WebSocket.OnDataReceived(Byte[] data, Int32 offset, Int32 length) at SuperSocket.ClientEngine.AsyncTcpSession.ProcessReceive(SocketAsyncEventArgs e) at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e) at System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationAsyncSuccess(Int32 bytesTransferred, SocketFlags flags) at System.Net.Sockets.SocketAsyncEventArgs.CompletionCallback(Int32 bytesTransferred, SocketFlags flags, SocketError socketError) at System.Net.Sockets.SocketAsyncEventArgs.TransferCompletionCallbackCore(Int32 bytesTransferred, Byte[] socketAddress, Int32 socketAddressSize, SocketFlags receivedFlags, SocketError socketError) at System.Net.Sockets.SocketAsyncContext.ReceiveOperation.InvokeCallback() at System.Net.Sockets.SocketAsyncContext.AsyncOperation.<>c.