geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ladyva...@apache.org
Subject [geode] branch feature/ackReaderThreadHang updated: SSLSockets do not support socket.shutDownOutput() resulting in connections not being destroyed.
Date Fri, 15 Sep 2017 23:14:38 GMT
This is an automated email from the ASF dual-hosted git repository.

ladyvader pushed a commit to branch feature/ackReaderThreadHang
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/ackReaderThreadHang by this push:
     new c9b8856  SSLSockets do not support socket.shutDownOutput() resulting in connections
not being destroyed.
c9b8856 is described below

commit c9b88569f33835940d21b4f3220b4dd856aab8e9
Author: Lynn Hughes-Godfrey <lhughesgodfrey@pivotal.io>
AuthorDate: Fri Sep 15 16:13:30 2017 -0700

    SSLSockets do not support socket.shutDownOutput() resulting in connections not being destroyed.
---
 .../cache/client/internal/ConnectionImpl.java      | 26 ++++++++++++----------
 .../ParallelGatewaySenderOperationsDUnitTest.java  |  4 ++--
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/cache/client/internal/ConnectionImpl.java
b/geode-core/src/main/java/org/apache/geode/cache/client/internal/ConnectionImpl.java
index 81e878e..7f940e2 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/client/internal/ConnectionImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/client/internal/ConnectionImpl.java
@@ -14,16 +14,6 @@
  */
 package org.apache.geode.cache.client.internal;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.net.SocketException;
-import java.nio.ByteBuffer;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
-
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.CancelException;
 import org.apache.geode.ForcedDisconnectException;
@@ -42,6 +32,16 @@ import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.logging.log4j.LocalizedMessage;
 import org.apache.geode.internal.net.SocketCreator;
+import org.apache.logging.log4j.Logger;
+
+import javax.net.ssl.SSLSocket;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.net.SocketException;
+import java.nio.ByteBuffer;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * A single client to server connection.
@@ -184,8 +184,10 @@ public class ConnectionImpl implements Connection {
     }
     try {
       if (theSocket != null) {
-        theSocket.getOutputStream().flush();
-        theSocket.shutdownOutput();
+        if ( !(theSocket instanceof SSLSocket) ) {
+          theSocket.getOutputStream().flush();
+          theSocket.shutdownOutput();
+        }
         theSocket.close();
       }
     } catch (Exception e) {
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index c804ec4..664a0bf 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -58,11 +58,11 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2,
lnPort));
 
     createCacheInVMs(nyPort, vm2, vm3);
-    // createReceiverInVMs(vm2, vm3);
+    //createReceiverInVMs(vm2, vm3);
     vm2.invoke(() -> WANTestBase.createReceiverWithSSL(nyPort));
     vm3.invoke(() -> WANTestBase.createReceiverWithSSL(nyPort));
 
-    // createCacheInVMs(lnPort, vm4, vm5);
+    //createCacheInVMs(lnPort, vm4, vm5);
     vm4.invoke(() -> WANTestBase.createCacheWithSSL(lnPort));
     vm5.invoke(() -> WANTestBase.createCacheWithSSL(lnPort));
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <commits@geode.apache.org>'].

Mime
View raw message