Bill commented on code in PR #7449:
URL: https://github.com/apache/geode/pull/7449#discussion_r844431556


##########
geode-core/src/main/java/org/apache/geode/internal/net/NioSslEngine.java:
##########
@@ -381,19 +408,26 @@ public synchronized void close(SocketChannel 
socketChannel) {
     try (final ByteBufferSharing outputSharing = outputBufferVendor.open(1, 
TimeUnit.MINUTES)) {
       final ByteBuffer myNetData = outputSharing.getBuffer();
 
-      if (!engine.isOutboundDone()) {
-        ByteBuffer empty = ByteBuffer.wrap(new byte[0]);
-        engine.closeOutbound();
+      engine.closeOutbound();
+
+      SSLEngineResult result = null;
+
+      while (!engine.isOutboundDone()) {
+        final ByteBuffer empty = ByteBuffer.wrap(new byte[0]);
 
         // clear the buffer to receive a CLOSE message from the SSLEngine
         myNetData.clear();
 
         // Get close message
-        SSLEngineResult result = engine.wrap(empty, myNetData);
-
-        if (result.getStatus() != SSLEngineResult.Status.CLOSED) {
-          throw new SSLHandshakeException(
-              "Error closing SSL session.  Status=" + result.getStatus());
+        result = engine.wrap(empty, myNetData);

Review Comment:
   I don't think so since we are wrapping an empty buffer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to