classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] small fix for ServerSocket close


From: Dalibor Topic
Subject: Re: [PATCH] small fix for ServerSocket close
Date: Wed, 19 Nov 2003 15:49:18 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Dalibor Topic wrote:
Hi Michael,

Michael Koch wrote:

--- /var/tmp/PROJECTS/classpath//./java/net/ServerSocket.java Fri Oct 17 19:05:29 2003
+++ java/net/ServerSocket.java    Wed Oct 22 21:32:21 2003
@@ -339,7 +339,8 @@
   */
  public void close () throws IOException
  {
-    impl.close ();
+    if (impl != null)
+      impl.close ();

    if (getChannel() != null)
      getChannel().close ();



After thinking about this patch, its more and more bogus in my eyes as
impl never may be null. I provided a better fix to libgcj. When its
approved I will merge it into classpath too.


Not yet, but soon it will.

ServerSocket is still broken with respect to how it behaves when it's closed. When the socket is closed, access to methods like accept() should throw an IOException that it's closed. Currently, no such checks

It should throw a SocketException, actually ;) I got carried away by my implementation details from java.io. fixes to kaffe. But you get the idea.

cheers,
dalibor topic





reply via email to

[Prev in Thread] Current Thread [Next in Thread]