Socks5
Socks5 copied to clipboard
code is NOT thread safe in sock5.BandwidthCounter.AddByte(int)
Problem occurs when a lot of connections request by client at the same time, you can reproduce the problem by opening 5 or more video pages in the Chrome at the same time. The variable "bytes" has chance to be modified unexpected a very large value and program go into dead while loop (cpu usage 100%).
Hi @gwjwin!
Can you try to run your code on this branch? https://github.com/zacbre/Socks5/tree/connection-fix
Perhaps this will help. A long time ago I located a bug within the BandwidthCounter and made this branch to test with.
Please let me know if this fixes your problem!
Thanks!