You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2019/09/16 12:48:29 UTC

[GitHub] [httpcomponents-core] ok2c commented on a change in pull request #149: HTTPCORE-601

ok2c commented on a change in pull request #149: HTTPCORE-601
URL: https://github.com/apache/httpcomponents-core/pull/149#discussion_r324653717
 
 

 ##########
 File path: httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java
 ##########
 @@ -345,6 +347,13 @@ private void updateEventMask() {
         }
         if (this.status == CLOSING && !this.outEncrypted.hasData()) {
             this.sslEngine.closeOutbound();
+            final int n = this.outboundClosedCount.incrementAndGet();
+            // This is to avoid an infinite session spin in case
+            // SSLEngine#closeOutbound() fails to trigger a graceful
+            // session shutdown
+            if (n > 5) {
 
 Review comment:
   @michael-o Out of my nose, I must admit. I have no idea how many repetitions may imply a session spin and a problem with the close notify handshake. Just two looked a bit too risky, 10 looked too much, so I ended up choosing 5.   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org