Closed Masoud-Kazemi closed 1 year ago
Recently I changed the behavior of the proxy from series to parallel but I forgot to use ConcurrentDictionary<TKey,TValue>
and also it's better to lock the collection during the entire enumeration.
I'm gonna update the TunnelManager today or you can modify the code yourself.
Thanks for letting me know.
Fixed: v2.3.7 Code: TunnelManager It would be great if you could confirm.
will do, i did not have the sdk and other apps ready where i am right now. also thanks for the quick fix. the code is alright , will respond after i got the release file.
Up until now everything is working A OK. Hope i dont Jinx it. Until Next time, Have a Great Day !!
After Working for while Proxy will stop working, i did not check the code 🙇🏻 MsmhTools/MsmhTools/HTTPProxyServer/TunnelManager.cs <<<<
Unhandled exception. System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct. at System.Collections.Generic.Dictionary`2.FindValue(TKey key) at MsmhTools.HTTPProxyServer.TunnelManager.Remove(Int32 threadId) at MsmhTools.HTTPProxyServer.HTTPProxyServer.<>c__DisplayClass86_0.gdisposeIt|0()
at MsmhTools.HTTPProxyServer.HTTPProxyServer.ConnectHttpsRequest(Int32 connectionId, TcpClient client, Request req, Boolean applyUpStreamProxy)
at System.Threading.Tasks.Task.<>c.b 128_1(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()