hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject httpcomponents-core git commit: HTTPCORE-483: back-ported SSL session termination bug fix from 5.x
Date Fri, 25 Aug 2017 09:38:11 GMT
Repository: httpcomponents-core
Updated Branches:
  refs/heads/4.4.x 01402bb4c -> 9caf4e637


HTTPCORE-483: back-ported SSL session termination bug fix from 5.x


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/9caf4e63
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/9caf4e63
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/9caf4e63

Branch: refs/heads/4.4.x
Commit: 9caf4e6376c447591a6725e9d34f3b94e262d87a
Parents: 01402bb
Author: Oleg Kalnichevski <olegk@apache.org>
Authored: Fri Aug 25 11:28:18 2017 +0200
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Fri Aug 25 11:28:18 2017 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9caf4e63/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
b/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
index 68951ad..847e26d 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
@@ -371,6 +371,9 @@ public class SSLIOSession implements IOSession, SessionBufferStatus, SocketAcces
 
     private void updateEventMask() {
         // Graceful session termination
+        if (this.status == CLOSING && !this.outEncrypted.hasData()) {
+            this.sslEngine.closeOutbound();
+        }
         if (this.status == CLOSING && this.sslEngine.isOutboundDone()
                 && (this.endOfStream || this.sslEngine.isInboundDone())) {
             this.status = CLOSED;


Mime
View raw message