Jez, so do we file this under?:
1 a java bug.
2. a windows bug.
3. every other computer in the world is wrong.
That basically must mean that when windows is in it's internal routines
that
take too long, that the timeouts for the java ports are being
'missed/overlooked/swallowed', it also accounts for why it's not showing up
on my windows SE . (nitbios is OFF)
Anyway, way to go !!!, on the bug hunt, did you get a packet sniffer on it,
how did you find it?
we could charge for this stuff. ( this is REAL WORLD programming) ;-)
( maybe roedy can get this on his web site)
personally if i were you, I would get a bug filed with sun, or add a fix
into
the code so that if the ping reply is > the preset timeout value , you
ignore it, and re-ping.
me, I'm scrapping off all the windows stuff in our office and moving to
linux
Steve
Wondering why my gateway showed activity on udp 137, I used a Packet
Analyzer (Packetyzer) on this.
Turning Netbios off: no netbios name resolution, saving 4.5s.
But still Packetyzer showed reverse-ptr DNS lookups, causing
testConn() to return values > timeoutMs ... huh?
These are triggered in the ProxySelector checking wether SOCKS should
be used or not. Disabling proxy support with
ProxySelector.setDefault(null);
or, when creating the socket, with
Socket theSock = new Socket(Proxy.NO_PROXY);
prevents these lookups, passing the calls directly to the plain socket
implementation, resulting in correct timeouts.
Alternatively, using
InetAddress addr = InetAddress.getByAddress(String host, byte[]
addr);
e.g. with
InetAddress addr = InetAddress.getByAddress(ipHost,
IPAddressUtil.textToNumericFormatV4(ipHost));
where ipHost is a String in IP-Format instead of
InetAddress addr = InetAddress.getByAddress(String host);
bypasses reverse lookups and also validity checking on the host
string.
After all, I think I´ll stick to this, it´s still more elegant and
simpler than the solution with the thread observing connectFinish() on
a SocketChannel I posted in (e-mail address removed)
Just been on bugs.java.com:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5092063
describing these problems got closed with state "fixed". So this is
not a bug at all
It´s just bad luck and two days lost.
guenter.