You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2023/05/24 17:14:59 UTC
[httpcomponents-core] branch 4.4.x updated: HTTPCORE-740: Introduce Read interest during connection close for graceful closure
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch 4.4.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
The following commit(s) were added to refs/heads/4.4.x by this push:
new fd3984d43 HTTPCORE-740: Introduce Read interest during connection close for graceful closure
fd3984d43 is described below
commit fd3984d4384b6a4d1c41417f33e83bc43c4a9378
Author: Arunan Sugunakumar <ar...@gmail.com>
AuthorDate: Thu Apr 20 19:51:06 2023 +0530
HTTPCORE-740: Introduce Read interest during connection close for graceful closure
---
.../java/org/apache/http/nio/reactor/ssl/SSLIOSession.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
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 41fcab804..4129b24e2 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
@@ -415,7 +415,15 @@ public class SSLIOSession implements IOSession, SessionBufferStatus, SocketAcces
newMask = EventMask.READ;
break;
case NOT_HANDSHAKING:
- newMask = this.appEventMask;
+ if (this.status >= CLOSING && isOutboundDone() && !isInboundDone()) {
+ // NEED_UNWRAP behavior
+ newMask = EventMask.READ;
+ } else if (this.status >= CLOSING && !isOutboundDone() && isInboundDone()) {
+ // NEED_WRAP behavior
+ newMask = EventMask.READ_WRITE;
+ } else {
+ newMask = this.appEventMask;
+ }
break;
case NEED_TASK:
break;