Re: Code Review 6994079: PlainSocketImpl should close the socket if it fails

2010-10-22 Thread Chris Hegarty

Alan Bateman wrote:

Chris Hegarty wrote:

Alan, Michael,

connect(SocketAddress,int) should close the underlying file descriptor 
if it fails for any reason. This is consistent with the other connect 
methods. A little other cleanup while there.


http://cr.openjdk.java.net/~chegar/6994079/webrev.00/webrev/

-Chris.
Looks fine to me.  It might be nicer to have "boolean connected", which 
is set to true when connectToAddress succeeds.


Yes, I'll rename this, failed -> connected

Thanks,
-Chris.


-Alan



Re: Code Review 6994079: PlainSocketImpl should close the socket if it fails

2010-10-22 Thread Alan Bateman

Chris Hegarty wrote:

Alan, Michael,

connect(SocketAddress,int) should close the underlying file descriptor 
if it fails for any reason. This is consistent with the other connect 
methods. A little other cleanup while there.


http://cr.openjdk.java.net/~chegar/6994079/webrev.00/webrev/

-Chris.
Looks fine to me.  It might be nicer to have "boolean connected", which 
is set to true when connectToAddress succeeds. 


-Alan



Code Review 6994079: PlainSocketImpl should close the socket if it fails

2010-10-22 Thread Chris Hegarty

Alan, Michael,

connect(SocketAddress,int) should close the underlying file descriptor 
if it fails for any reason. This is consistent with the other connect 
methods. A little other cleanup while there.


http://cr.openjdk.java.net/~chegar/6994079/webrev.00/webrev/

-Chris.