You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get SocketException from webSocket's error handler. Error:System.Net.Sockets.SocketException (0x80004005): Transport endpoint is not connected
Get close event from webSocket's close handler.
Get unhandled Exception. Stack trace:
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.ArraySegmentList1.CopyTo(T[] to, Int32 srcIndex, Int32 toIndex, Int32 length) at WebSocket4Net.WebSocketCommandInfo..ctor(IList1 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.b__14_0(Object o)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
The text was updated successfully, but these errors were encountered:
bohao-cao
changed the title
Getting System.ArgumentException: Destination array was not long enough. when opening a stream
Getting System.ArgumentException: Destination array was not long enough. when re-opening a stream
Dec 12, 2017
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);
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.ArraySegmentList
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.b__14_0(Object o)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
The text was updated successfully, but these errors were encountered: