On 1.5.0 and 1.5.1 versions of OKX.API I have started experiencing a bug that crashes my app.
I don't know what makes the app crash, because It happens randomly after using your package to trade on OKX for a while.
All I get is this stack trace:
Unhandled exception. System.AggregateException: One or more errors occurred. (Collection was modified; enumeration operation may not execute.)
---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.Queue1.Enumerator.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext()
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source, Int32& length) at System.Collections.Generic.Queue1..ctor(IEnumerable`1 collection)
at ApiSharp.Models.AsyncResetEvent.<>c__DisplayClass5_0.b__0() in E:\Github\ApiSharp\ApiSharp\Models\AsyncResetEvent.cs:line 51
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
--- End of inner exception stack trace ---
at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
Only this OKX.Api package uses ApiSharp in my app, so the issue must come from there.
On 1.5.0 and 1.5.1 versions of OKX.API I have started experiencing a bug that crashes my app. I don't know what makes the app crash, because It happens randomly after using your package to trade on OKX for a while. All I get is this stack trace:
Unhandled exception. System.AggregateException: One or more errors occurred. (Collection was modified; enumeration operation may not execute.) ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.Collections.Generic.Queueb__0() in E:\Github\ApiSharp\ApiSharp\Models\AsyncResetEvent.cs:line 51
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
--- End of inner exception stack trace ---
at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
1.Enumerator.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator
1.MoveNext() at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source, Int32& length) at System.Collections.Generic.Queue
1..ctor(IEnumerable`1 collection) at ApiSharp.Models.AsyncResetEvent.<>c__DisplayClass5_0.Only this OKX.Api package uses ApiSharp in my app, so the issue must come from there.