Hi,

This fixes an issue with timeouts on accepted sockets. Since we aren't
using select for timeouts accepted sockets inherit the timeout value of
their ServerSocket. This patch resets the timeout to zero.

2006-05-14  Mark Wielaard  <[EMAIL PROTECTED]>

        PR 27459
        * native/jni/java-net/javanet.c (_javanet_accept): Reset the
        inherited timeout on socket.

I also added a Mauve test for this.

Committed to trunk and release branch.

Cheers,

Mark

diff -u -r1.33 javanet.c
--- native/jni/java-net/javanet.c       6 Feb 2006 07:53:38 -0000       1.33
+++ native/jni/java-net/javanet.c       14 May 2006 20:01:57 -0000
@@ -835,6 +835,9 @@
     }
   while (result != TARGET_NATIVE_OK);

+  // Reset the inherited timeout
+  TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT (newfd, 0, result);
+
   /* Populate instance variables */
   _javanet_set_int_field (env, impl, "gnu/java/net/PlainSocketImpl",
                          "native_fd", newfd);

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to