saros
saros copied to clipboard
[INTERNAL][CORE] Redo optimization to Socks5 transport
The current code was hard to understand and not really maintainable.
Removed the simultaneous connection attempts in both directions. Only one connection attempt is made as is it very likely the the reverse connection attempt will also fail if the first one fails.
The logic could be reintroduced but we should ensure that the connection attempt to B->A is made after A->B and not in parallel to keep the logic simple.
Here is an overview of what got changed by this pull request:
Complexity decreasing per file
==============================
+ core/src/saros/net/stream/Socks5StreamService.java -4
See the complete overview on Codacy