Casey Marshall wrote:

Index: gnu/java/net/PlainDatagramSocketImpl.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/java/net/PlainDatagramSocketImpl.java,v
retrieving revision 1.11
diff -u -r1.11 PlainDatagramSocketImpl.java
--- gnu/java/net/PlainDatagramSocketImpl.java   17 Sep 2006 07:31:41 -0000      
1.11
+++ gnu/java/net/PlainDatagramSocketImpl.java   21 Sep 2006 23:16:22 -0000
@@ -41,6 +41,7 @@
 import gnu.java.nio.VMChannel;
import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.lang.reflect.Field;
 import java.net.DatagramPacket;
 import java.net.DatagramSocketImpl;
@@ -49,6 +50,7 @@
 import java.net.NetworkInterface;
 import java.net.SocketAddress;
 import java.net.SocketException;
+import java.net.SocketTimeoutException;
 import java.nio.ByteBuffer;
/**
@@ -259,7 +261,17 @@
           throw new NullPointerException();
         if (port <= 0)
           throw new SocketException("invalid port " + port);
-        channel.send(buf, new InetSocketAddress(remote, port));
+        while (true)
+          {
+            try
+              {
+                channel.send(buf, new InetSocketAddress(remote, port));
+              }
+            catch (InterruptedIOException ioe)
+              {
+                // Ignore; interrupted system call.
+              }
+          }
       }

How does the while loop exit?

Just wondering,
David Daney

Reply via email to