harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r633068 - /harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/PipeImpl.java
Date Mon, 03 Mar 2008 12:34:00 GMT
Author: tellison
Date: Mon Mar  3 04:33:59 2008
New Revision: 633068

URL: http://svn.apache.org/viewvc?rev=633068&view=rev
Log:
Fix for HARMONY-5530 (Selector.select() returns exception if network connection is lost)

Modified:
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/PipeImpl.java

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/PipeImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/PipeImpl.java?rev=633068&r1=633067&r2=633068&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/PipeImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/PipeImpl.java
Mon Mar  3 04:33:59 2008
@@ -108,7 +108,7 @@
             super(provider);
             sourceServer = provider.openServerSocketChannel();
             sourceServer.socket().bind(
-                    new InetSocketAddress(InetAddress.getLocalHost(), 0));
+                new InetSocketAddress(InetAddress.getByName(null), 0));
             serverPort = sourceServer.socket().getLocalPort();
         }
 
@@ -161,8 +161,8 @@
         }
 
         public boolean finishConnect() throws IOException {
-            return sinkSocket.connect(new InetSocketAddress(InetAddress
-                    .getLocalHost(), serverPort));
+            return sinkSocket.connect(
+                new InetSocketAddress(InetAddress.getByName(null), serverPort));
         }
 
         protected void implCloseSelectableChannel() throws IOException {



Mime
View raw message