Code Review 6964547: Impossible to set useV4 in SocksSocketImpl

Alan Bateman Alan.Bateman at oracle.com
Thu Jan 13 01:29:10 PST 2011


Chris Hegarty wrote:
> :
> Ah yes, I just moved the socket close to after the version check. The 
> client will be blocked (in the socks protocol handhake) until the 
> socket on the server side is closed.
>
> Updated test:
>
> http://cr.openjdk.java.net/~chegar/6964547/webrev.02/webrev/test/java/net/Socks/SocksProxyVersion.java.html 
>
This looks better but is (as you say) exploiting the fact that the 
handshake didn't complete. It might be cleaner and more obvious to the 
reader if the main thread waited for the "SOCKS server" thread to 
terminate. Just a suggestion to save time in the event that the test 
were to fail.

-Alan



More information about the net-dev mailing list