Hi, As discussed in the Kaffe mailing list[1], in some cases, GNU Classpath's java.net.Socket creates sockets which will never be closed.
[1] http://www.kaffe.org/pipermail/kaffe/2004-April/045856.html http://www.kaffe.org/pipermail/kaffe/2004-April/045866.html And here is a patch: ChangeLog entry: 2004-04-16 Helmer Kraemer <[EMAIL PROTECTED]> * libraries/javalib/java/net/Socket.java getImpl(): Avoid creating a redundant file descriptor. --- java/net/Socket.java.orig Sat Apr 17 08:54:56 2004 +++ java/net/Socket.java Sat Apr 17 09:26:28 2004 @@ -81,12 +81,6 @@ private SocketImpl impl; /** - * True if socket implementation was created by calling their - * create() method. - */ - private boolean implCreated; - - /** * True if the socket is bound. */ private boolean bound; @@ -312,19 +306,6 @@ // This has to be accessible from java.net.ServerSocket. SocketImpl getImpl() throws SocketException { - try - { - if (! implCreated) - { - impl.create(true); - implCreated = true; - } - } - catch (IOException e) - { - throw new SocketException(e.getMessage()); - } - return impl; } @@ -358,6 +339,7 @@ // bind to address/port try { + getImpl().create(true); getImpl().bind(tmp.getAddress(), tmp.getPort()); bound = true; } _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath