Code Review 6964547: Impossible to set useV4 in SocksSocketImpl

Chris Hegarty chris.hegarty at oracle.com
Thu Jan 13 01:42:35 PST 2011


On 01/13/11 09:29 AM, Alan Bateman wrote:
> 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.

Yes, I should know better ( after trying to debug many of these spurious 
failures ).

http://cr.openjdk.java.net/~chegar/6964547/webrev.02/webrev/test/java/net/Socks/SocksProxyVersion.java.html

-Chris.

>
> -Alan



More information about the net-dev mailing list