summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2007-02-08 11:52:07 +0000
committerBenoit Foucher <benoit@zeroc.com>2007-02-08 11:52:07 +0000
commitf9e2a89ee7973392d22a39cb2cd8e28f02b56347 (patch)
tree23e50ccf89cc68d98f7c6f1e38142cfabb99bafa /java/src
parentFix (diff)
downloadice-f9e2a89ee7973392d22a39cb2cd8e28f02b56347.tar.bz2
ice-f9e2a89ee7973392d22a39cb2cd8e28f02b56347.tar.xz
ice-f9e2a89ee7973392d22a39cb2cd8e28f02b56347.zip
Bug 1739
Diffstat (limited to 'java/src')
-rw-r--r--java/src/IceInternal/Network.java40
-rw-r--r--java/src/IceInternal/TcpTransceiver.java28
2 files changed, 40 insertions, 28 deletions
diff --git a/java/src/IceInternal/Network.java b/java/src/IceInternal/Network.java
index 51227d0bac3..92a1547d234 100644
--- a/java/src/IceInternal/Network.java
+++ b/java/src/IceInternal/Network.java
@@ -82,24 +82,28 @@ public final class Network
return false;
}
- public static boolean
- notConnected(java.net.SocketException ex)
- {
- String msg = ex.getMessage().toLowerCase();
- if(msg.indexOf("transport endpoint is not connected") != -1)
- {
- return true;
- }
- //
- // BUGFIX: We check for EINVAL because shutdown() under Mac OS
- // X returns EINVAL if the server side is gone.
- //
- else if(msg.indexOf("invalid argument") != -1)
- {
- return true;
- }
- return false;
- }
+ //
+ // This method is not used anymore. See comments in
+ // TcpTransceiverI.java.
+ //
+// public static boolean
+// notConnected(java.net.SocketException ex)
+// {
+// String msg = ex.getMessage().toLowerCase();
+// if(msg.indexOf("transport endpoint is not connected") != -1)
+// {
+// return true;
+// }
+// //
+// // BUGFIX: We check for EINVAL because shutdown() under Mac OS
+// // X returns EINVAL if the server side is gone.
+// //
+// else if(msg.indexOf("invalid argument") != -1)
+// {
+// return true;
+// }
+// return false;
+// }
public static java.nio.channels.SocketChannel
createTcpSocket()
diff --git a/java/src/IceInternal/TcpTransceiver.java b/java/src/IceInternal/TcpTransceiver.java
index b0f8fc3ba6c..e2af6f90a6b 100644
--- a/java/src/IceInternal/TcpTransceiver.java
+++ b/java/src/IceInternal/TcpTransceiver.java
@@ -89,16 +89,15 @@ final class TcpTransceiver implements Transceiver
catch(java.net.SocketException ex)
{
//
- // Ignore errors indicating that we are shutdown already.
+ // Ignore. We can't reliably figure out if the socket
+ // exception is because the socket is not connected.
//
- if(Network.notConnected(ex))
- {
- return;
- }
-
- Ice.SocketException se = new Ice.SocketException();
- se.initCause(ex);
- throw se;
+ // if(!Network.notConnected(ex))
+ // {
+ // Ice.SocketException se = new Ice.SocketException();
+ // se.initCause(ex);
+ // throw se;
+ // }
}
catch(java.io.IOException ex)
{
@@ -126,7 +125,16 @@ final class TcpTransceiver implements Transceiver
}
catch(java.net.SocketException ex)
{
- // Ignore.
+ //
+ // Ignore. We can't reliably figure out if the socket
+ // exception is because the socket is not connected.
+ //
+ // if(!Network.notConnected(ex))
+ // {
+ // Ice.SocketException se = new Ice.SocketException();
+ // se.initCause(ex);
+ // throw se;
+ // }
}
catch(java.io.IOException ex)
{