Re: Code Review 6947677: InetAddress.isReachable() throws "java.net.SocketException:Invalid argument" on Linux if run as root

2010-10-21 Thread Alan Bateman
Chris Hegarty wrote: : I did think about this, but the local interface addresses are reachable, isReachable returns true, even if the lookback interface is specified. We'd have to maintain a list of "reachable" addresses. Which I didn't think would be an nicer solution. I would think that all

hg: jdk7/tl/jdk: 2 new changesets

2010-10-21 Thread chris . hegarty
Changeset: 70bf328b7c65 Author:chegar Date: 2010-10-21 16:49 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/70bf328b7c65 6993490: SocketTimeoutException on HTTP keep-alive connections Reviewed-by: michaelm ! src/share/classes/sun/net/NetworkClient.java ! src/share/classes/su

Re: Code Review 6993490: SocketTimeoutException on HTTP keep-alive connections

2010-10-21 Thread Michael McMahon
Chris Hegarty wrote: Hi Michael, The resetting of the read timeout after, error stream buffering, Expect 100-Continue handling, and keepalive cleaner, may be problematic if the read timeout is the default value. The default read tmeout is -1 ( not set ), but Networkclient.setReadTimeout ignor

Re: Code Review 6947677: InetAddress.isReachable() throws "java.net.SocketException:Invalid argument" on Linux if run as root

2010-10-21 Thread Chris Hegarty
On 21/10/2010 15:25, Alan Bateman wrote: Chris Hegarty wrote: : It appears to be specific to the loopback interface. You can reproduce the very same behavior using DatagramSocket and DatagramChannel; bind to the loopback address and send a packet to a remote address. I was not too happy about

Re: Code Review 6947677: InetAddress.isReachable() throws "java.net.SocketException:Invalid argument" on Linux if run as root

2010-10-21 Thread Alan Bateman
Chris Hegarty wrote: : It appears to be specific to the loopback interface. You can reproduce the very same behavior using DatagramSocket and DatagramChannel; bind to the loopback address and send a packet to a remote address. I was not too happy about doing this until I found that we do the

Re: Code Review 6947677: InetAddress.isReachable() throws "java.net.SocketException:Invalid argument" on Linux if run as root

2010-10-21 Thread Chris Hegarty
On 21/10/2010 14:05, Alan Bateman wrote: Chris Hegarty wrote: Hi Michael, On some Linuxes, when bound to the loopback interface, sendto will fail and errno will be set to EINVAL. When that happens, don't throw an exception, just return false. We already do this in the case where we cannot creat

hg: jdk7/tl/jdk: 6993267: TEST_BUG: java/nio/file/Path/InterruptCopy.java fails intermittently (win)

2010-10-21 Thread alan . bateman
Changeset: d9057727e2fa Author:alanb Date: 2010-10-21 14:39 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/d9057727e2fa 6993267: TEST_BUG: java/nio/file/Path/InterruptCopy.java fails intermittently (win) Reviewed-by: forax ! test/java/nio/file/Path/InterruptCopy.java

Re: Code Review 6947677: InetAddress.isReachable() throws "java.net.SocketException:Invalid argument" on Linux if run as root

2010-10-21 Thread Alan Bateman
Chris Hegarty wrote: Hi Michael, On some Linuxes, when bound to the loopback interface, sendto will fail and errno will be set to EINVAL. When that happens, don't throw an exception, just return false. We already do this in the case where we cannot create raw sockets, i.e. when not running as

Code Review 6947677: InetAddress.isReachable() throws "java.net.SocketException:Invalid argument" on Linux if run as root

2010-10-21 Thread Chris Hegarty
Hi Michael, On some Linuxes, when bound to the loopback interface, sendto will fail and errno will be set to EINVAL. When that happens, don't throw an exception, just return false. We already do this in the case where we cannot create raw sockets, i.e. when not running as root. http://cr.ope

Code Review 6993490: SocketTimeoutException on HTTP keep-alive connections

2010-10-21 Thread Chris Hegarty
Hi Michael, The resetting of the read timeout after, error stream buffering, Expect 100-Continue handling, and keepalive cleaner, may be problematic if the read timeout is the default value. The default read tmeout is -1 ( not set ), but Networkclient.setReadTimeout ignores values less than 0.