Patch: java.net.InetAddress

Michael Koch konqueror@gmx.de
Thu Nov 27 11:44:00 GMT 2003


Hi list,


InetAddress.lookup() has the problem that is looks up all addresses given to 
it. Even "0.0.0.0" is looked up. DNS severs tend to just return 0.0.0.0 as 
address. GLIBC doesnt seem to do this. When you have no access to a nameserver
the lookup method blocks until a timeout occurs (normally 5 seconds or so).
This mainly occurs on offline systems.

To circumvent this timeout I rewrite lookup() to just return when it is asked 
for "0.0.0.0".

Please review and comment.


Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inetaddress.diff
Type: text/x-diff
Size: 3694 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20031127/15d4f4ca/attachment.bin>


More information about the Java-patches mailing list